Menu question 101 :-)
Menu question 101 :-)
- Subject: Menu question 101 :-)
- From: Maxwell Robertson <email@hidden>
- Date: Tue, 16 Aug 2005 22:40:34 +0100
Hi All,
i am still getting my head around objective-c et al and I have run
into a problem which maybe someone can explain it to me.
I have a Menus.m file which programmatically creates and populates
multiple menus - these menus reflect user data so they have to be
made at run time. Each menu item is assigned a target and action:
setTarget:self
setAction:@selector(doMenu:)
et all.
doMenu is defined as (IBaction)doMenu:(id)sender
All the menu code is called from one function called "launchedMenu"
which when called at init time all works correctly. Menus load up and
the code all works.
However I would like to call this function from another unrelated .m
file.
This I can do and all the menus are built correctly. But the program
crashes when any of the menu items are selected.
It seems to crash when the code gets to "doMenu:" - which I am
guessing is now being associated with the wrong "self".
As stated earlier I am on the long objective-c learning path, so any
pointers in this area would be appreciated. Even if it is which part
of the documentation I should be reading. :-)
Max.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden