Re: Checkbox, Dictionary, Bindings
Re: Checkbox, Dictionary, Bindings
- Subject: Re: Checkbox, Dictionary, Bindings
- From: Greg Herlihy <email@hidden>
- Date: Mon, 09 Jan 2006 22:56:03 -0800
- Thread-topic: Checkbox, Dictionary, Bindings
NSNumbers may be immutable, but they are not irreplaceable.
To check or uncheck the checkbox simply replace the NSNumber currently
representing its checked state with a different NSNumber whose value
represents the checkbox's updated state.
Greg
On 1/9/06 3:18 PM, "Chris Outwin" <email@hidden> wrote:
> I would like to manage a checkbox via a dictionary and bindings. The
> problem is NSNumber and NSValue are immutable, and I can't find
> another class to represent the changing on/off state of the
> checkbox. What class can I use?
>
> NSDictionary* _properties;
>
> NSArray* values = [NSArray arrayWithObjects:[What Class?], //
> scalesImage
> nil];
>
> NSArray* keys = [NSArray arrayWithObjects:@"scalesImage"
>
> _properties = [[NSDictionary alloc] initWithObjects:values
> forKeys:keys];
> _______________________________________________
> 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
_______________________________________________
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