• 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
Using a valuetransformer in a popupmenu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using a valuetransformer in a popupmenu


  • Subject: Using a valuetransformer in a popupmenu
  • From: Eli Bach <email@hidden>
  • Date: Tue, 9 Mar 2010 15:11:47 -0700

I have a core data application, with an NSArrayController with the managedobjects I want to display in an NSPopupMenu.

I can get the popup to display a specific attribute of each object [like attributeX, say] by binding the content to the controller.arrangedObjects and binding content values to controller.arrangedObjects.attributeX

But I would like to use a generated value based on multiple fields of the object.

But adding an NSValueTransformer [either registered or unregistered] to the Content Values binding, it doesn't get called [if it's bound to either controller.arrangedObjects.attributeX or controller.arrangedObjects.self].

Am I doing this wrong or should I just implement an accessor for the managedobject that generates the string from the multiple fields [which mixes the model and the view, but I'll probably do this just to move forward until I can find the 'right' way to do it].

Eli

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Bison/Yacc with Objective-C ?
  • Next by Date: Re: [[Class alloc] init] preferable over [[Class instance] retain]?
  • Previous by thread: Re: Bison/Yacc with Objective-C ?
  • Next by thread: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5
  • Index(es):
    • Date
    • Thread