Representing hierarchy in NSPopupButtonCell
Representing hierarchy in NSPopupButtonCell
- Subject: Representing hierarchy in NSPopupButtonCell
- From: Jeff Watkins <email@hidden>
- Date: Tue, 14 Jun 2005 06:35:34 -0400
(This is a follow-up to my original email with "NSTreeController and
NSPopupButton(Cell)".)
Since this is the first time I've really tried to step beyond what
Cocoa gives me as default behaviour, it took me longer than it
probably should to stumble across NSMenuItem's -setIndentationLevel:
message. Unfortunately, I can't see any clean way to connect the
hierarchy represented by the NSTreeController to the indentation
level of the menu items.
All is not lost, because I can see two potential solutions:
1) Build the NSPopupButtonCell's menu the old way (without bindings).
This would allow me complete control over the menu. The only question
I have is whether there are any issues to look out for when using
bindings in an NSTableView for some cells and not others.
2) Respond to the NSPopUpButtonCellWillPopUpNotification notification
and set the indentation level just before the popup is displayed.
Any suggestions for which approach might be better?
Thanks,
Jeff
--
Jeff Watkins
http://metrocat.org/
_______________________________________________
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