• 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
Re: Date + Formatter + Text Field Strangeness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date + Formatter + Text Field Strangeness


  • Subject: Re: Date + Formatter + Text Field Strangeness
  • From: "I. Savant" <email@hidden>
  • Date: Fri, 8 Dec 2006 01:18:42 -0500


I thought I'd update everyone on this thread (thanks to Matt and Jonathon for their responses).


The date formatters used were stock NSDateFormatter instances attached to the text fields in IB. Each was configured to display a separate component of the date. The underlying NSDate was changed each time to reflect exactly what the formatters were displaying -- incorrectly changing components that shouldn't have been changed.

What I ultimately ended up doing was giving in and subclassing NSDatePicker and making a few modifications to suit my purposes. So far, the testing reveals no flaws, so I'm fairly confident it will work for me. I'm still at a loss to explain the behavior of the previous configuration.

--
I.S.


On Sat, 2 Dec 2006 17:05:55 -0500, "I. Savant" <email@hidden>
said:
List:

  I have an application that keeps track of things based on a
reference date. For various reasons (one of which has to do with the
selected time scale - years, months, days, or time; another is that
the NSDatePicker control doesn't work right in 10.4 for my purposes),
the editor represents the date with several text fields, one for each
component.

  For example, I have a field for Year, one for Month, one for Day,
and one for Time (in hours, minutes, and seconds). All these text
fields use date formatters to display only their component of the
date and all are bound to the document's referenceDate key.

  The problem is that:

- When I set the month, then the day, the month changes.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >Re: Date + Formatter + Text Field Strangeness (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: animating windows fade in/out
  • Next by Date: NSTextView Not Drawing Text
  • Previous by thread: Re: Date + Formatter + Text Field Strangeness
  • Next by thread: DiskArbitration & Finder
  • Index(es):
    • Date
    • Thread