• 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: warning 'NSEvent' may not respond to '+eventWithEventRef:'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warning 'NSEvent' may not respond to '+eventWithEventRef:'


  • Subject: Re: warning 'NSEvent' may not respond to '+eventWithEventRef:'
  • From: Ken Tozier <email@hidden>
  • Date: Tue, 26 May 2009 01:16:06 -0400

So it is. I didn't notice that. Thanks Kiel

I need to target both Tiger and Leopard so I think I'll just write a category that does the same thing and hides the carbon calls .


On May 26, 2009, at 1:08 AM, Kiel Gillard wrote:

+ eventWithEventRef is Mac OS X 10.5 Leopard only API. It is unavailable on Mac OS X 10.4 Tiger.

If you want to write from Leopard only, set the base SDK of your target to the 10.5 SDK.

Kiel

On 26/05/2009, at 2:52 PM, Ken Tozier wrote:

Hi

I'm getting a warning when calling NSEvent's eventWithEventRef

NSEvent *event	= [NSEvent eventWithEventRef: ref];

I include Appkit and Carbon in the file where this warning appears

#import <AppKit/AppKit.h>
#import <Carbon/Carbon.h>

And the documentation doesn't say this is an obsolete method

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSEvent_Class/Reference/Reference.html#/ /apple_ref/occ/clm/NSEvent/eventWithEventRef:

So why am I getting the warning?

Despite the warning, it seems to run fine, just kind of annoying to see this yellow 'WARNING !!!!" balloon in my code.

Thanks in advance
_______________________________________________

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


_______________________________________________

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


References: 
 >warning 'NSEvent' may not respond to '+eventWithEventRef:' (From: Ken Tozier <email@hidden>)
 >Re: warning 'NSEvent' may not respond to '+eventWithEventRef:' (From: Kiel Gillard <email@hidden>)

  • Prev by Date: Re: warning 'NSEvent' may not respond to '+eventWithEventRef:'
  • Next by Date: String Comparison and return values
  • Previous by thread: Re: warning 'NSEvent' may not respond to '+eventWithEventRef:'
  • Next by thread: Re: warning 'NSEvent' may not respond to '+eventWithEventRef:'
  • Index(es):
    • Date
    • Thread