- (NSPoint)convertBaseToScreen:(NSPoint)point
- (NSPoint)convertBaseToScreen:(NSPoint)point
- Subject: - (NSPoint)convertBaseToScreen:(NSPoint)point
- From: koko <email@hidden>
- Date: Thu, 26 Jan 2012 12:41:33 -0700
The docs say that - (NSPoint)convertBaseToScreen:(NSPoint)point is deprecated and to use - (NSRect)convertRectToScreen:(NSRect)aRect
So, does one create a rect whose origin is the point in question and whose size is zero?
So here is some code:
NSWindow *keyWindow = [NSApp keyWindow];
NSRect r;
r.origin.x = lpPoint->x;
r.origin.y = lpPoint->y;
r.size.width = 0;
r.size.height = 0;
NSRect cr = [keyWindow convertRectToScreen:r];
The last line throws one error and a warning:
No viable conversion from 'id' to 'NSRect' (aka '_NSrect')
instance method '-convertRectToScreen' not found (return type defaults to 'id')
But -convertRectToScreen ins in the NSWindow reference.
So what am I missing?
-koko
_______________________________________________
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