Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Yet another newbie....



> After going through the "Currency Converter" tutorial twice, I decided
> to try applying that stuff to my very own trial project - a simple
> calculator.
> Things went pretty well. I got the interface up and wrote my action
> methods and now have a working calculator. Very exciting. The problem,
> at least the one I'm trying to solve now, is I want to capture the
> keyboard input of the +,-, *, and / keys so I can trigger those math
> operations without using the mouse (and hopefully prevent them from
> writing to the textField).

An alternative to this is what I did for my calculator project: in IB just set
the associated key for the button to the symbol. Then when "+" is pressed,
the button "+" will call its attached method as if it were pressed. No need
to go playing with keyDown events and if your button code is working, then
this is an instant fix.
--
____________________________________________________________________________
Adam Knight
______________________________Codito, ergo sum______________________________




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.