On 06/06/2009, at 2:03 AM, Martin Batholdy wrote:
I have a problem, getting a window in front by clicking a menu item;
In my xcode project I have a menuHandler, which has methods to
create a menu, add items to that menu, delete items and so on.
Since you're new to Cocoa and to OO programmi
[menuItem setTarget:myWindowOutlet];
[menuItem setAction:@selector(makeKeyAndOrderFront:)];
ok, that makes sense to me.
But now, the menuItem is inactive (so I cant click on it).
here my code;
hope someone can give me a clue what is wrong with the code...
AppController.h
#import "Men
A nib/xib contains frozen objects. If you load them they are thawed.
You can load a nib multiple times with a new instance of its owner
every time.
Am 05.06.2009 um 21:52 schrieb Martin Batholdy:
If you create your menuHandler in awakeFromNib, how can you connect
it to the window in IB? It
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 (showWin
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
On Jun 5, 2009, at 12:03 PM, Martin Batholdy wrote:
The method that generates this item in the menuHandler refers to the
function "showWindow" inside itself
(setTarget:self).
Did you also do setAction:? If so, are you sure you capitalized and
spelled the name of the action method correctly
Is myWindow nil?
and it is called a method, not a function ;)
atze
Am 05.06.2009 um 18:03 schrieb Martin Batholdy:
hi!
I have a problem, getting a window in front by clicking a menu item;
In my xcode project I have a menuHandler, which has methods to
create a menu, add items to t
hi!
I have a problem, getting a window in front by clicking a menu item;
In my xcode project I have a menuHandler, which has methods to create
a menu, add items to that menu, delete items and so on.
My AppController knows about the menuHandler and creates an instance
of it in the awakeFrom