Re: NSTreeController: do leaf and non-leaf nodes have to be of the same class?
Re: NSTreeController: do leaf and non-leaf nodes have to be of the same class?
- Subject: Re: NSTreeController: do leaf and non-leaf nodes have to be of the same class?
- From: Greg Hurrell <email@hidden>
- Date: Thu, 18 May 2006 21:40:49 +0200
El 18/05/2006, a las 21:19, Greg Hurrell escribió:
El 18/05/2006, a las 20:21, Ondra Cada escribió:
The best (arguably) and most convenient (definitely) solution is
to make your "group" respond to these messages, returning
reasonable default "empty" values. That're those "kludgey methods"
of yours.
On further inspection it appears that this is exactly what the
"Raises for not applicable keys" checkbox is for... searching for
that string on Google yields 7 hits (wow), but one of them is this
Apple document:
http://tuvix.apple.com/documentation/Cocoa/Reference/CocoaBindingsRef/
CocoaBindingsRef.pdf
Which on page 35 says that "Raises for not applicable keys" is:
A Boolean value that specifies if an exception is raised when a
binding is bound to a key that does not exist.
If YES, an exception is raised when the bound key is not
applicable, otherwise the NSNotApplicableMarker is returned..
So looks like that's exactly what I need, and I won't have to write
phoney methods in my "group" class.
Cheers,
Greg
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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