• 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
Hierarchy in NSPopUpButtonCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hierarchy in NSPopUpButtonCell


  • Subject: Hierarchy in NSPopUpButtonCell
  • From: Jeff Watkins <email@hidden>
  • Date: Mon, 20 Jun 2005 20:56:31 -0400

At long last, I've got an NSPopUpButtonCell in my NSTableView that represents the hierarchy of entities using the indentationLevel property of each NSMenuItem.

However, now I need to connect the dynamically created NSPopUpButtonCell to the NSArrayController that is the source of the objects for the NSTableView. Ideally, I'd like to do this with bindings.

Unfortunately, I don't really understand bindings well enough to know how to go about this. Presumably, I want to bind the NSTableColumn's value to the selected item in the NSPopUpButtonCell. Because I've put the entities in the NSMenuItem's representedObject property, I suppose the binding would look something like:

    tableColumn.value = popupButton.selectedItem.representedObject

is this the same as

    tableColumn.value = popupButton.selectedObject?

Of course, the best answer would be to subclass NSPopUpButtonCell to implement the hierarchy directly. But I can't quite figure out what messages I'd need to override.

Any help would be greatly appreciated...

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: How to trap for the delete key in NSOutlineView?
  • Next by Date: Re: Printing a WebView
  • Previous by thread: Resizing image with slider
  • Next by thread: NSFileManager - getting list of "safe" files/folders
  • Index(es):
    • Date
    • Thread