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

Re: keyEventWithType


  • Subject: Re: keyEventWithType
  • From: Matt Neuburg <email@hidden>
  • Date: Sun, 25 Aug 2002 19:26:58 -0700

On Sun, 25 Aug 2002 20:35:46 -0500, Steve Mills <email@hidden> said:

>MyWindow.m:28: warning: cannot find class (factory) method.
>MyWindow.m:28: warning: return type for
>`keyEventWithType:windowNumber:context:modifierFlags:characters:charactersIg
>noringModifiers:isARepeat:keyCode:timestamp:location:' defaults to id
>
>Anybody know what's going on? It almost seems like keyEventWithType isn't
>actually implemented yet

This means exactly what it says.

What is not implemented is
keyEventWithType:windowNumber:context:modifierFlags:characters:charactersIg
>noringModifiers:isARepeat:keyCode:timestamp:location:. The docs mention no
>such method. The header file doesn't contain it. In short, you made it up
>out of your own head, and the compiler is suggesting that you might not
>want to do that.

The only method that starts with the phrase "keyEventWithType" is
keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifier:isARepeat:keyCode:.
You must match that exactly.

You're probably coming from some other programming language background.
Well, you can forget that other programming language. :-) In Objective-C
you don't get to fiddle with the order or names of the parameters or leave
out some of them. Read the Objective-C book (included with the dev
documentation) to understand why. m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: keyEventWithType
      • From: Steve Mills <email@hidden>
  • Prev by Date: Odd sheet behavior
  • Next by Date: Re: How to make a NSPanel show up in Windows menu?
  • Previous by thread: Re: keyEventWithType
  • Next by thread: Re: keyEventWithType
  • Index(es):
    • Date
    • Thread