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

Re: NSDeviceResolution


  • Subject: Re: NSDeviceResolution
  • From: Greg Parker <email@hidden>
  • Date: Thu, 25 Feb 2010 13:50:56 -0800

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     email@hidden     Runtime Wrangler


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSDeviceResolution
      • From: David Blanton <email@hidden>
References: 
 >NSDeviceResolution (From: David Blanton <email@hidden>)

  • Prev by Date: Re: NSDeviceResolution
  • Next by Date: Re: NSDeviceResolution
  • Previous by thread: Re: NSDeviceResolution
  • Next by thread: Re: NSDeviceResolution
  • Index(es):
    • Date
    • Thread