• 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
NSDate and binding to pattern display value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDate and binding to pattern display value


  • Subject: NSDate and binding to pattern display value
  • From: <email@hidden>
  • Date: Fri, 18 Mar 2005 12:20:39 +0000

Hey all, I have an NSDate ivar in my model object, bound to a column in a table view (pretty standard).  In IB, I've put an NSDateFormatter on there to display the date in the interface as %m/%d/%y (03/18/05).

But I want to dynamically update an NSTextField with some text and the value of the date column for the selected row.  So I bound the "Value With Pattern" binding of the NSTextField to the appropriate arrayController/selection/model key path, and set the Display Pattern to "Info for %[value1]@:".

But when I select a row, it displays the value as "2005-03-18 06:17" (basically, the current date and time).  And I just realized that it won't let me change the value of the Date cell.  It always reverts back to todays date.

Well, I think I can figure that out, what I can't figure out is how to get it to display the date the way I set it in the formatter I applied to the table column.  Any suggestions?

James

"Do or do not; there is no try."

 _______________________________________________
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: how to get image resolution from NSImage
  • Next by Date: Window minimum width
  • Previous by thread: Re: how to get image resolution from NSImage
  • Next by thread: Window minimum width
  • Index(es):
    • Date
    • Thread