Re: NSPopUpButton
Re: NSPopUpButton
- Subject: Re: NSPopUpButton
- From: "Donald A. Yacktman" <email@hidden>
- Date: Sat, 13 Apr 2002 12:06:43 -0600
You wrote:
>
Hello folks. I'm having a problem with two of my five NSPopUpButtons
>
that I use in my application. What I'm trying to do is to use
>
selectItemWithTitle. This method works on three of five, where I pass
>
the title in the form of [myPopupButton selectItemWithTitle:@"title to
>
select"]. The other two, I am getting the title from a method in one of
>
my classes that returns a string: [myPopupButton
>
selectItemWithTitle:[myClass methodThatReturnsAString]].
If it was me, I'd NEVER select based on title. Titles change with
localizations. I prefer to set tags in the popup's items and them select them
later based on their tags. If you're setting actions for each item, selecting
the item with a particular action might be a good approach.
(A few really simple categories to make these section approaches easier are
worth creating. Search for the item, then select that item. The Mac OS X
MiscKit will have a few utilities along these lines...)
--
Later,
Don Yacktman
email@hidden
----------------------------------------------------
The NeXT computer: The hardware makes it a PC, the
software makes it a Workstation, the unit sales make
it a Mainframe."
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.