Re: Key Equivalents
Re: Key Equivalents
- Subject: Re: Key Equivalents
- From: email@hidden
- Date: Wed, 15 May 2002 16:20:38 -0700
John Nairn wrote:
|I have three buttons and I set one to have "return"
|as a key equivalent and two to have command keys. The return causes a
|crash and the two key equivalents are ignored.
Without knowing more about how everything is set up, there's little that can be said.
I just created (using Project Builder and Interface Builder) a small app that has a window with three buttons, one with "return" for its key, the others with command-Y and command-=. Pressing each key is ignored, as expected. Nothing untoward--like a crash--occurs. I have to assume that (1) the "return" button has an "action connection", and (2) that the method invoked by the action connection is what's actually causing the crash.
|Maybe there is more to key equivalents then just setting them in
|Interface Builder, but I have not been able to find documentation. I
|would appreciate help or point me where to look.
I'm assuming that you're already aware that a button has to have an "action connection" made, which determines what Objective-C method is executed when the button is clicked (or its key equivalent pressed). If not, the Interface Builder documentation is a starting point (available from PB via the "Developer Tools" help), and the description of "Action Messages" (under "Events and Other Input", from "Cocoa Help" in the PB Help menu). Also, the Objective-C tutorial gets into setting up connections. (It's available only in PDF, unfortunately. You can find it in "Getting Started" under "Cocoa Help".) Setting the key equivalent and making the connection are pretty much it; everything else is window dressing, to make things prettier and easier to use.
To say anything specific, though, I'd need to see what your action method is doing.
Glen Fisher
_______________________________________________
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.