home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!bogus.sura.net!udel!louie!pokey.cis.udel.edu!sethi
- From: sethi@pokey.cis.udel.edu (Adarshpal S Sethi)
- Subject: Reading numbers in TextEdit
- Message-ID: <1993Jan25.210950.22383@udel.edu>
- Sender: usenet@udel.edu (USENET News Service)
- Nntp-Posting-Host: pokey.cis.udel.edu
- Organization: University of Delaware, Newark
- Date: Mon, 25 Jan 1993 21:09:50 GMT
- Lines: 19
-
-
- I have a Modeless Dialog with a TextEdit field that I want
- to use to read in a number. I would like to disable any
- character that is not a numeric character from being entered.
- Is there a way of doing this? I couldn't see anything in
- IM that was helpful. In the worst case, can I get access
- to each character that is entered in a TextEdit field, then
- check if it is a numeric character, if not delete the
- character from the text being entered and continue?
- If there is a sample program available somewhere that can
- do this, that would be great (I'm using Think C 5.0), but
- I would appreciate any help at all, whether it is a general
- outline of how to do this, or pointers to specific places in
- IM.
-
- Thanks,
-
- Adarsh Sethi
- sethi@udel.edu
-