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 (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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to