If you create your menuHandler in awakeFromNib, how can you connect it to the window in IB? It not there when you try to connect the outlet.

You seem to connect to another / a wrong menuHandler instance.

Yeah ... I think that is what is going wrong;

what I know is, that the method (showWindow:) gets called
(did make that sure by adding NSLog-messages) -
but it does not interact with the window.


but ... how would you do the connections to the window properly?

Do I have to connect the window in the IB with the AppController?
But than ... the MenuHandler don't know nothing about the window ...

And how can I say the menuItem in menuHandler to use an existing instance of an AppController Object?
(with setTarget: ...) ..

I am pretty new to object-oriented programming.

So I don't really know how you can say a menuItem;
hey, there is an instance of an object that created you, and this also have connection to an existing window; now go to the openWindow method when someone clicks on you and get that damn window in front...
(is that the way it should work ..?)







Am 05.06.2009 um 20:54 schrieb Alexander Spohr:

Ah, wait!

Am 05.06.2009 um 18:03 schrieb Martin Batholdy:

My AppController [...] creates an instance of it in the awakeFromNib function.

[...]

I have created a window in the Interface Builder and have connected it with an IBOutlet NSWindow variable in the MenuHandler.

If you create your menuHandler in awakeFromNib, how can you connect it to the window in IB? It not there when you try to connect the outlet.

You seem to connect to another / a wrong menuHandler instance.


        atze


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to