• 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: NSNumber numberWithBool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNumber numberWithBool


  • Subject: Re: NSNumber numberWithBool
  • From: "Clark Cox" <email@hidden>
  • Date: Mon, 29 Jan 2007 09:27:46 -0500

On 1/29/07, mark hill <email@hidden> wrote:
I have declared a NSMutableDictionary thus:

  NSArray * keys      = [NSArray arrayWithObjects:
@"name", @"hidden", nil];
        NSArray * values    = [NSArray
arrayWithObjects: @"Object Name", [NSNumber
numberWithBool:false], nil];
        properties = [[NSMutableDictionary alloc]
initWithObjects: values forKeys: keys];

But cannot access the "hidden" BOOL value, it refers
to IB checkbox binding.

NSLog(@"%@", [properties valueForKeyPath: @"hidden"]);

returns 0 or 1 as expected, but I can't seem to
implement a conditional based on this!

BOOL flag = [[properties valueForKeyPath: @"hidden"] boolValue]; if(flag) { ... }


-- Clark S. Cox III 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


References: 
 >NSNumber numberWithBool (From: mark hill <email@hidden>)

  • Prev by Date: Re: KVO, design and documentaion
  • Next by Date: Re: NSTableView with bindings as a drag destination.
  • Previous by thread: NSNumber numberWithBool
  • Next by thread: Application information that all users can see
  • Index(es):
    • Date
    • Thread