Newbie: NonDirect Java - Using Popup Menus in Nib Files
Newbie: NonDirect Java - Using Popup Menus in Nib Files
- Subject: Newbie: NonDirect Java - Using Popup Menus in Nib Files
- From: Martin Spenceley <email@hidden>
- Date: Wed, 19 Mar 2003 16:23:29 +0000
Hello again,
I am having a lot of problems trying to use Popup Menus in NIB files.
In the latest documentation there is an example on how to do this. But I get lost at the last paragraph:
> In the nib file?s controller class, add a method called setKey. This is invoked when an object in the pop-up menu is > selected.
>publicvoid setKey(int illustrator) {
> _illustrator = (String)controllerDisplayGroup().valueForObjectAtIndex(illustrator, "name");
>}
> It sets an instance variable in the class (_illustrator) to the String value of the object selected in the menu.
What am I supposed to do with the _illustrator information now I've got it?
How do I get it into an 'Image Search?'? I assume this has to be hard coded from then on?
The second problem is the following scenario:
I have a multi-related schema of the form:
Country -> Town -> Street -> House
e.g. Country is related to town ( in a one to many relationship) etc....
In my interface, I want to select a Country from a popup menu which will show a list of towns in a TableView.
If I use a NSTableView for the Country, the Towns appears
in the next Table without issues. If I try to use the JCStudios example with their Popup Menu, most often the Popup menu is
just grayed out or becomes grayed out. This is sort of understandable (though don't ask me to explain it!).
Would I be right in saying I cannot use a Popup Menu for the purpose I want? If not, I need to do something along the
lines of the written example or can I do everything in the NIB?
Regards,
Martin
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.