On Feb 25, 2010, at 1:40 PM, David Blanton wrote:
> [window deviceDescription] is to return an NSDictionary of device description 
> data
> 
> NSDeviceResolution key is to return an NSString representing an NSSIze
> 
> Calling NSSizeFromString on this returned string causes and exception
> 
> -[NSConcreteValue getCString:maxLength:encoding:]: unrecognized selector sent 
> to instance 0x130165e0

NSDeviceResolution does not give you an NSString. It gives you an NSValue 
respresenting an NSSize. Try this:

        NSValue* v = [dd valueForKey:NSDeviceResolution];
        NSSize sz = [v sizeValue];

(The error message gives you a hint: NSConcreteValue is one of the 
implementations of NSValue.)


-- 
Greg Parker     gpar...@apple.com     Runtime Wrangler


_______________________________________________

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 arch...@mail-archive.com

Reply via email to