• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Representing hierarchy in NSPopupButtonCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Spotlight Importer for files in "Project-Based" folder
  • Next by Date: Re: NSDocument: Connecting the menubar to objects?
  • Previous by thread: Re: Cocoa-Java-based Universal Binary? Works.
  • Next by thread: Re: Representing hierarchy in NSPopupButtonCell
  • Index(es):
    • Date
    • Thread