This conversation started about NSDatePicker. Now you are referring to 
NSDateFormatter. Which one are you dealing with? My test shows that a nib 
instantiated NSDatePicker has a nil timeZone value.

-raleigh

On Jul 6, 2011, at 8:05 AM, Kyle Sluder wrote:

> On Wed, Jul 6, 2011 at 7:11 AM, Fritz Anderson <fri...@manoverboard.org> 
> wrote:
>> On 6 Jul 2011, at 12:16 AM, Trygve Inda wrote:
>> 
>>> It seems that NSDateFormatters instantiated in my nibs get their zone set to
>>> PDT (because of my time settings), despite having called
>>> 
>>> [NSTimeZone setDefaultTimeZone:[NSTimeZone
>>> timeZoneWithAbbreviation:@"GMT"]];
>>> 
>>> Before any nibs are loaded.
>> 
>> Which makes sense. The model is that objects in XIBs/NIBs are instantiated 
>> when Interface Builder archives them, not when the NIBs are loaded. Your 
>> attempt to initialize them from a runtime default has no effect because 
>> they've already been initialized.
> 
> Well, it "makes sense" insofar as "this is a plausible explanation for
> this behavior." But it would make much more sense for NSDateFormatter
> to implement -awakeFromNib and configure itself according to the
> locale it's loaded into.
> 
> --Kyle Sluder
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/ledet%40apple.com
> 
> This email sent to le...@apple.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to