home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.hypercard
- Path: sparky!uunet!usc!sol.ctr.columbia.edu!ucselx!babb
- From: babb@ucselx.sdsu.edu (babb j)
- Subject: find function
- Message-ID: <1992Jul29.214621.6634@ucselx.sdsu.edu>
- Organization: San Diego State University Computing Services
- X-Newsreader: Tin 1.1 PL4
- Date: Wed, 29 Jul 1992 21:46:21 GMT
- Lines: 42
-
- I'm modifying a script for a stack that stores info from students in a comma
- delimited file. I want to filter any comma's out of the field before the
- field's info is written to the file. I scripted:
-
- on returnInField
- find chars ","
- if result is empty then
- answer "Sorry, no comma's allowed" with "Darn!"
- end if
- end returnInField
-
- 1) If there's a comma in the field, the whole field is selected, not just
- the comma. I'd like to just delete a selected comma at that point. BUT...
-
- 2) If there is NO comma, Hypercard goes to an Audio card!!! This card
- isn't even the next card, it's #14 and the field & handler are on card
- #9. Card IDs aren't close either. I checked out the mesg watcher and saw...
-
- openField
- keyDown
- returnInField
- find
- closeCard
- put
- closeBackground
- openBackground
- openCard
- SndList
- .
- .
- .
- I can't figure out why the find routine is closing the card and opening
- another (seemingly) unrelated one when there's no comma!!??!!
- Any ideas?
- Jeff.
- babb@ucselx.sdsu.edu
-
- --
- Jeff Babb - Programmer/Technical Support - San Diego State University
- Language Acquisition Resource Center (L.A.R.C.) (619)594-4475
- babb@ucsvax.sdsu.edu
- .."now go away or I shall taunt you a second time" M.P.& T.H.G.
-