• 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: Checkbox, Dictionary, Bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Checkbox, Dictionary, Bindings
      • From: Chris Outwin <email@hidden>
References: 
 >Checkbox, Dictionary, Bindings (From: Chris Outwin <email@hidden>)

  • Prev by Date: Re: Crash in _blinkCaretTimerAction (NSTextView)
  • Next by Date: Re: Radix Class
  • Previous by thread: Checkbox, Dictionary, Bindings
  • Next by thread: Re: Checkbox, Dictionary, Bindings
  • Index(es):
    • Date
    • Thread