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

NSDeviceResolution


  • Subject: NSDeviceResolution
  • From: David Blanton <email@hidden>
  • Date: Thu, 25 Feb 2010 14:40:31 -0700

[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

here is the code

- (NSSize)deviceDPI {

	NSDictionary* dd = [m_window deviceDescription];
	NSString* v = [dd valueForKey:NSDeviceResolution];
	NSSize sz = NSSizeFromString(v);
	return sz;
}


v is @"{72, 72}" when print-object is called on it in the debugger


I do not see anything wrong with the code ... do you?

-db
_______________________________________________

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: Greg Parker <email@hidden>
    • Re: NSDeviceResolution
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .
  • Next by Date: Re: NSColorPanel changeColor not called [work around]
  • Previous by thread: RE: iCal-style NSTextFields
  • Next by thread: Re: NSDeviceResolution
  • Index(es):
    • Date
    • Thread