Re: Binding NSTextField to an Unsigned int
Re: Binding NSTextField to an Unsigned int
- Subject: Re: Binding NSTextField to an Unsigned int
- From: Mike Abdullah <email@hidden>
- Date: Sat, 3 Feb 2007 19:45:29 +0000
Either really. Personally I find NSValueTrasnformer to be slightly
easier to use, but it's up to you.
Mike.
On 3 Feb 2007, at 19:30, Matthew Leon Grinshpun wrote:
Thanks for the info... Does this mean that I subclass NSFormatter
and do that?
On 3-Feb-07, at 1:30 PM, Mike Abdullah wrote:
You have to use -[NSNumber numberWithUnsignedInt:] KVO should
handle making this an actual unsigned int when it is required.
Mike.
On 3 Feb 2007, at 18:09, Matthew Leon Grinshpun wrote:
I have asked this question several days ago on cocoadev, but have
yet to receive a response, here: http://www.cocoadev.com/index.pl?
BindingQuestions
Hence, I turn to you...
How do I bind an NSTextField to an unsigned int?
Some explanation: I want to bind my NSTextField to the
selectionIndex key of an NSArrayController. Apple suggests
(http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaBindings/Concepts/Troubleshooting.html#//apple_ref/doc/uid/
TP40002148-182420) that I "consider transforming the value using
an NSValueTransformer, or in the specific case of NSTextField,
NSFormatter."
For some reason, I can't wrap my head around what, exactly, I
should do with an NSFormatter to have my NSTextField send an
unsigned int... Likewise, I can't figure out how to program an
NSValueTransformer to send out an unsigned int, since it seem to
have to send out some kind of object and not a primitive datatype.
Thanks ahead of time,
Matthew
_______________________________________________
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:
40mikeabdullah.net
This email sent to email@hidden
_______________________________________________
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