home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.hypercard
- Path: sparky!uunet!gatech!destroyer!cs.ubc.ca!unixg.ubc.ca!kakwa.ucs.ualberta.ca!alberta!trlabs!agt!news
- From: Allen Winter <AWINTER1@agt.ab.ca>
- Subject: Re: Still need help on ref'ing btn
- Message-ID: <1992Dec22.173731.24527@agt.uucp>
- X-Xxdate: Tue, 22 Dec 92 09:58:30 GMT
- Sender: news@agt.uucp
- Nntp-Posting-Host: 128.9.32.10
- Organization: AGT Ltd
- X-Useragent: Nuntius v1.1.1d9
- References: <1gm1ciINNagk@uniwa.uwa.edu.au>
- Date: Tue, 22 Dec 92 17:37:31 GMT
- Lines: 29
-
- In article <1gmo08INNsl0@uniwa.uwa.edu.au> Steven P Wilkinson,
- spw@uniwa.uwa.edu.au writes:
- >Now if I refer to cd btn "23" (also its name) then unfortunately
- >hypercard assumes I am talking about the btn with id 5432 when in
- >fact I want to talk about the btn with id 2233 whose name is "23".
-
- I tried out the same operation (i.e. referring to a button name, which is
- identical to the NUMBER of another button) and it worked OK for me. Are
- you putting quotes around the number when using it as a name? e.g.
- after giving a button the NAME of "3":
-
- get the rect of card button "3" -- this does NOT get the rect of card
- button 3
-
- If this still doesn't work and you need to work around the problem,
- concatenate a word to the end of the number to create a name that now
- looks like text. e.g.:
-
- put "xxx" into Text
- set the name of button id 123 to loopCounter && Text -- button name = "23
- xxx"
-
- The button name still has the number as word 1 of the name, if this
- important in the rest of your scripts, but there is now no way for it to
- be confused with a number.
-
- Allen Winter;
- AGT Ltd; R&D; Edmonton, Alberta
- AWINTER1@agt.ab.ca
-