Re: Expanding lists
Re: Expanding lists
- Subject: Re: Expanding lists
- From: Andrew Zamler-Carhart <email@hidden>
- Date: Wed, 20 Oct 2004 00:50:23 +0100
Dear James,
I'd be willing to bet that Mail, iTunes, and the Finder aren't using
NSTableViews to implement their lists of rules. Taking Mail.app for
example, you can find a file inside the app bundle called
RuleCriterionView.nib that contains an NSView that represents one rule.
So when you click a plus button, it's expanding the window and adding
one of those views.
I have an application that implements a list of rules that *does* use
an NSTableView, however. Basically it has three columns: the first uses
an NSPopUpButtonCell for the field name, the second uses an
NSPopUpButtonCell for the relationship (is, is not, etc.) and the last
uses a normal NSTextFieldCell for the value. Then I just have a single
set of plus/minus buttons at the bottom of the table for adding and
removing criteria.
Using NSViews is more flexible, as you aren't constrained to using the
same size and number of controls for each kind of criterion. For
example, iTunes changes how the controls are laid out for "Last Played"
depending upon whether the relationship is "is", "is in the last", or
"is in the range". You couldn't really do that if you were using an
NSTableView.
On the other hand, if your needs are relatively simple, an NSTableView
could work great.
Best regards,
Andrew
KavaSoft
On Oct 19, 2004, at 10:04 PM, J Tichenor wrote:
I want to implement something similar to what Apple does in some of
it's preference panes, such as Mail and iTunes. You have a filter or
conditional list of items that need to be matched in some way. You
start with one line, a couple pulldown buttons, a textField and minus
and plus buttons. Press the plus button and a new line of elements is
added. You all know what I'm talking about -- make a new Mail Rule or
iTunes Smart list.
Anyway, can anyone confirm: are these essentially animated tableViews,
which grow and shrink depending on the number of rows the table has?
Is there anything else I should know about these before I try and
backwards engineer something similar?
TIA --
~j~
James Tichenor
VFX Supervisor
AIM: email@hidden
(07779) 256 103
http://www.lehopictures.com/the_joint/
_______________________________________________
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