Best way to implement a calculator style display/input system?
Best way to implement a calculator style display/input system?
- Subject: Best way to implement a calculator style display/input system?
- From: Dave Camp <email@hidden>
- Date: Wed, 23 Jun 2004 17:53:45 -0700
I was wondering if anyone might have suggestions for the best way to
implement a "calculator" style (for lack of a better term) text display
and input handler.
My app has a view like the standard Calculator app with a colored
background and text and numbers displayed on top of that. I essentially
want the user to be able to press keys and have the corresponding
characters appended to the display and have the delete key work as
well. Like the Calculator app, there are no visual indicators for the
insertion point or focus.
My first thought was to have the window delegate implement keydown: and
tack printable characters onto the end of a NSTextField. I would have
to manually handle the delete key and remove characters as needed.
However, I thought a cleaner design might be possible with an
NSTextView if there was an easy way to make it not display the focus
ring and insertion point, and have it always be the first responder. It
seems like it would be preferable to allow the text system to perform
all the key event processing for me.
Any suggestions?
Dave
---
In English, every word can be verbed.
_______________________________________________
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.