FROM : Richard S. French
DATE : Fri Nov 21 14:48:05 2008
How does one get a boolean value from a dictionary object?
My XML dictionary contains the value </true> under the given key.
Should this be retrieved as NSNumber or some other object?
I am trying to set the state of a checkbox button based on the value as
below:
// return syntax coloring switch
BOOL *colorSwitch = NO;
colorSwitch = [NSNumber numberWithBOOL:[temp
objectForKey:@"BBLMColorsSyntax"]];
NSLog(@"Color: %@", colorSwitch);
if ( colorSwitch == YES) {
[colorBox setState:NSOnState];
}
else {
[colorBox setState:NSOffState];
}
DATE : Fri Nov 21 14:48:05 2008
How does one get a boolean value from a dictionary object?
My XML dictionary contains the value </true> under the given key.
Should this be retrieved as NSNumber or some other object?
I am trying to set the state of a checkbox button based on the value as
below:
// return syntax coloring switch
BOOL *colorSwitch = NO;
colorSwitch = [NSNumber numberWithBOOL:[temp
objectForKey:@"BBLMColorsSyntax"]];
NSLog(@"Color: %@", colorSwitch);
if ( colorSwitch == YES) {
[colorBox setState:NSOnState];
}
else {
[colorBox setState:NSOffState];
}
| Related mails | Author | Date |
|---|---|---|
| Richard S. French | Nov 21, 14:48 | |
| Ken Thomases | Nov 21, 15:13 | |
| Graham Cox | Nov 21, 15:15 | |
| Heinrich Giesen | Nov 21, 16:42 | |
| Michael Ash | Nov 21, 16:51 | |
| David Blanton | Nov 21, 16:54 | |
| Nick Zitzmann | Nov 21, 17:19 | |
| Ed Wynne | Nov 21, 17:20 | |
| Ken Thomases | Nov 21, 17:25 | |
| Gary L. Wade | Nov 21, 17:29 | |
| Clark Cox | Nov 21, 20:01 | |
| Karl Goiser | Nov 24, 06:20 |






Cocoa mail archive

