• 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
- (NSPoint)convertBaseToScreen:(NSPoint)point
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

- (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


  • Follow-Ups:
    • Re: - (NSPoint)convertBaseToScreen:(NSPoint)point
      • From: Sean McBride <email@hidden>
    • Re: - (NSPoint)convertBaseToScreen:(NSPoint)point
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Open a new terminal tab or window from a Cocoa app at a certain directory without using NSAppleScript?
  • Next by Date: Re: - (NSPoint)convertBaseToScreen:(NSPoint)point
  • Previous by thread: Intermittent IKImageBrowserView crash
  • Next by thread: Re: - (NSPoint)convertBaseToScreen:(NSPoint)point
  • Index(es):
    • Date
    • Thread