On Sat, Oct 25, 2008 at 6:11 PM, Adam Penny <[EMAIL PROTECTED]> wrote: > My question is how do I do the checks for the if clause?
The documentation says that if the key doesn't exist, the function returns NULL. So then you just check to see if your servers variable is null. The documentation also mentions using CFGetTypeID to determine if a CFPropertyListRef is an array or some other type. And NSMutableArray is toll-free bridged to CFMutableArrayRef. So: servers = CFPreferencesCopyAppValue( CFSTR("servers"), appID); if(servers && CFGetTypeID(servers) == CFArrayGetTypeID()) { // woohoo! } --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]