> If the file's owner is the controller, you should not be adding a controller
> object to the nib, because then you will wind up with two of them.
Makes sense. And reading a little on File's Owner, it seems to be the right
choice - at least for other than the MainMenu.xib.
Setting up a separat
On Mar 1, 2011, at 3:31 PM, Sven Schwyn wrote:
> Turns out that it works if I hook the window outlet to File's Owner instead
> of the Preferences Controller delegate. (The amount of at first sight
> reasonnable ways to do things can be confusing at times.)
If the file's owner is the controller,
Turns out that it works if I hook the window outlet to File's Owner instead of
the Preferences Controller delegate. (The amount of at first sight reasonnable
ways to do things can be confusing at times.)
Thanks for your hints! -sven
___
MacRuby-deve
You probably need to load it differently
PreferencesController.alloc.initWithWindowNibNamed See apples documentation
to make sure you're using the correct API.
-Robert
Sent from my iPhone
On Mar 2, 2011, at 10:50 AM, Scott Ribe wrote:
> On Mar 1, 2011, at 2:46 PM, Sven Schwyn wrote:
>
On Mar 1, 2011, at 2:46 PM, Sven Schwyn wrote:
> On Mar 1, 2011, at 9:37 PM, Scott Rybe wrote:
>> Is the window hooked up to its controller? (Which is probably first
>> responder?)
>
> Well, I've dragged the window outlet of the delegate "Preferences Controller"
> onto the window object and cha
On Mar 1, 2011, at 9:37 PM, Scott Rybe wrote:
> Is the window hooked up to its controller? (Which is probably first
> responder?)
Well, I've dragged the window outlet of the delegate "Preferences Controller"
onto the window object and changed the File's Owner class to
PreferencesController.
___
On Mar 1, 2011, at 2:34 PM, Sven Schwyn wrote:
> eventhough the delegate appears to be hooked up okay.
Is the window hooked up to its controller? (Which is probably first responder?)
--
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
Forgot to mention that I've tried preferences.windows.center() already,
however, preferences.window is nil and therefore the center method call
kabooms. (If I check the "visible at launch", the window shows and window is
still nil - eventhough the delegate appears to be hooked up okay.)
By the
Hi Sven,
Actually it's
preferences.window.center()
preferences.window.makeKeyAndOrderFront(self)
Sorry!
-Robert
On Mar 2, 2011, at 8:19 AM, Sven Schwyn wrote:
> Hi Franco
>
> Thanks for the quick reply. However, I get this if I try your hint:
>
> undefined method `center' for #
> I seem t
Hi Franco
Thanks for the quick reply. However, I get this if I try your hint:
undefined method `center' for #http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Hi Sven,
Creating a window wont necessarily make it the Key or Main window. What I tend
to do is always disable the "visible at launch" checkbox inside interface
builder and do something like
def menu_preferences(sender)
preferences = PreferencesController.new
preferences.center
Hi
For the preferences, I've created a second XIB. However, when the corresponding
controller is instantiated, the window does appear but does not gain focus. Any
idea what I'm doing wrong here?
preferences_controller.rb:
class PreferencesController < NSWindowController
def windowNibNam
12 matches
Mail list logo