Macruby prefPane - Nothing works

216 views Asked by At

I've created a super simple example application using Macruby. The problem is that the prefpane won't work, nothing happens.

I've created a button, that has a callback in the Main.rb file. When someone clicks on the button the label should change value to "Some data".

The link to the Main.rb file also contains the non working example project.

There is only 3 lines of code added.

1

There are 1 answers

3
alloy On BEST ANSWER

The problems were being shown in your console messages (Console.app). Or if you would start System Preferences.app from the command-line you could have seen the messages there. Anyways, copy-pasting from the commit message:

  • The Main.rb file was never being loaded in the runtime with a call like: require 'Main'.
  • The resources path of the bundle isn't added to the load path by default, so I did this in PrefPane.rb.
  • Why do you really need the Main class instead of using the PrefPane class?
  • You had the `text' outlet of Main hooked up to the content view in the nib, not to the actual text label.

Last but not least, since MacRuby is still a ‘young’ project, I urge people to ask their questions there, so the actual community can help out.