Re: NSPopUpButton question (newbie)
Re: NSPopUpButton question (newbie)
- Subject: Re: NSPopUpButton question (newbie)
- From: Charilaos Skiadas <email@hidden>
- Date: Thu, 10 Mar 2005 11:53:19 -0600
On Mar 10, 2005, at 10:33 AM, j o a r wrote:
On 2005-03-10, at 17.11, Charilaos Skiadas wrote:
I wanted to implement a "history list" pop-up button with text
commands that the user typed, so I wanted to allow multiple items,
and so I accessed the menu directly. It worked fine, though I never
have to remove an item from the list or any the following commands
either. So depends on what you want to do with it I guess.
It's quite common to implement that as a NSComboBox, because it also
provides autocompletion which can be nice in these cases. A combo box
allows duplicates "out of the box".
Yeah, someone mentioned that when I was implementing it, and that was
my first inclination too, but I really wanted the title of the control
to be "History", not one of the entries of the history list, and,
unless I have missed something, this was not so easy to accomplish with
the combo box.
Another thing that you could think about is if it wouldn't be OK to
strip out old duplicates when adding new entries - in order to both
comply with the intended use of NSPopUpButton, but also to keep the
list of old entries shorter and easier to use at a quick glance. This
would of course not work if you plan to provide an exact history of
every action ever performed... It depends on what the purpose of the
button is.
Basically in my case the user was using a console type window to send
commands to a background app, and each command was added to the history
list, executed, and its output was printed to the screen. Then I wanted
the user to have the option of copying the whole history of his
actions, in the way he executed them, and paste it in any other app. So
from that point of view, I felt it would be counterintuitive to have
the multiple appearances disappear, but then appear when you copy the
thing. So yeah, in my case the exact history mattered.
j o a r
Haris
_______________________________________________
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