Re: PList Data Typing

2014-12-16 Thread Jens Alfke
> On Dec 16, 2014, at 11:46 AM, Uli Kusterer > wrote: > > Make sure you test that thoroughly. I remember that older Mac OS X releases > didn't have a separate boolean class, so depending on who writes that file on > what OS, you may just get an NSNumber (even if you call NSNumber > numberWit

Re: PList Data Typing

2014-12-16 Thread Uli Kusterer
On 15 Dec 2014, at 23:28, Jens Alfke wrote: >> On Dec 15, 2014, at 2:10 PM, Kevin Bracey wrote: >> >> How can I tell if the Value is a Boolean or Number in the NSDictionary? as 0 >> and 1 are valid values for a number. > > There's no clean solution for this. You have to take advantage of the f

Re: PList Data Typing

2014-12-15 Thread Ken Thomases
On Dec 15, 2014, at 4:10 PM, Kevin Bracey wrote: > I'm needing to read in a PList, that others have designed, I have no control > over the input. > > One of the Keys stores either a String, Number or Boolean value. > > Checking for the NSString is straight forward. > > How can I tell if the V

Re: PList Data Typing

2014-12-15 Thread Kevin Bracey
Thanks Jens, You’re fantastic! Have a great holiday season to all, and thanks for all the help over the years! On 16/12/2014, at 11:28 am, Jens Alfke wrote: > >> On Dec 15, 2014, at 2:10 PM, Kevin Bracey wrote: >> >> How can I tell if the Value is a Boolean or Number in the NSDictionary? as

Re: PList Data Typing

2014-12-15 Thread Jens Alfke
> On Dec 15, 2014, at 2:10 PM, Kevin Bracey wrote: > > How can I tell if the Value is a Boolean or Number in the NSDictionary? as 0 > and 1 are valid values for a number. There's no clean solution for this. You have to take advantage of the fact that the YES and NO NSNumbers are singleton obj