• 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
NSPopUpMenu contentValues not allowing value transformer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopUpMenu contentValues not allowing value transformer


  • Subject: NSPopUpMenu contentValues not allowing value transformer
  • From: Jonathan Wight <email@hidden>
  • Date: Sun, 2 Oct 2005 15:19:59 -0400

I have created an NSPopUpMenu that uses bindings to bind to a 'date' attribute of a CoreData entity. This works well and I can select dates and so forth. Unfortunately the dates in the pop up are of the form "2005-09-27 00:00:00 -0400" which is a tad ugly. I want the dates to be formatted like "Sunday, October 2, 2005".

So I created a quick NSValueTransformer that takes NSDates and returns the correctly formatted string. I then set the value transformer of the popup menu's "contentValues" binding to the name of my newly created transformer. I also make sure + [NSValueTransformer setValueTransformer:forName:] gets called before the popup menu.

Unfortunately - the behaviour of the popup menu hasn't changed. It doesn't seem to be using my value transformer at all - I've put breakpoints/logs in the code and nothing.

Is there something special about popup menu transformers? Or it it because this is bound to a Core Date object (I've never actually needed to use value transformers with core date before)?

Thanks in advance.

    Jon.
_______________________________________________
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: Unnecessary Invocations of outlineView:setObjectValue:forTableColumn:byItem:
  • Next by Date: Re: Control position
  • Previous by thread: NSView -window Calling -display??
  • Next by thread: singular hard links
  • Index(es):
    • Date
    • Thread