Re: "Controller Cannot Be nil" on binding NSTextField
Re: "Controller Cannot Be nil" on binding NSTextField
- Subject: Re: "Controller Cannot Be nil" on binding NSTextField
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 13 May 2008 05:19:57 -0400
- Thread-topic: "Controller Cannot Be nil" on binding NSTextField
on 2008-05-13 12:06 AM, Johnny Lundy at email@hidden wrote:
> I still have to do the crazy
>
> self.hoursString = [[NSNumber numberWithInt: self.hours] stringValue];
>
> To get a string from an int for the textField to bind to. If I bind it
> to the model deadline.hours, which is a scalar int, it displays zero
> while NSLog is merrily displaying 23 from the same variable.
>
> Is converting the int to a NSNumber and then to a string make sense
> here? Seems roundabout.
Look at the reference documentation for +[NSString stringWithFormat:], and
the String Programming Guide for Cocoa (particularly the Formatting String
Objects and String Format Specifiers sections).
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
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