card names (& labels)

erik hansen erikhans08 at yahoo.com
Tue Jul 1 16:45:01 EDT 2003


--- Jan Schenkel <janschenkel at yahoo.com> wrote:
> --- Nicholas Thieberger wrote:
> > It appears that card names cannot be digits
> but must
> > include an 
> > alphabetic character, is that right? I have
> to name
> > cards according 
> > to external filenames which can be entirely
> numeric,
> > and when I try 
> > go cd NAME or go cd "NAME" it doesn't work,
> but go cd NAMEa does work 
> > (if I rename the card).

> The reason why you can't use all digits, is
> that when
> you refer to card n, where n is a number, it
> thinks
> you want card _number_ n (ie the n-th card),
> not card
> _named_ n.
> Quoting the number won't do the trick because
> the
> engine interprets the parameter, sees it's a
> number
> and tries to be helpful.
> So put a "c" in front of the number, and you
> won't have a problem.

i had this problem in an application where a
piano keyboard HAS to show numerals representing
ASCII code (middle C = "60"). the keyboard
buttons must be referenced when hiliting,
changing shape etc. what i did in HC was 
store the btn ids as comma delimited items 
in a fld, store the name numbers in a function,
then use the offset function to get 
the id number in the fld.

someone on the MetaCard list pointed out that
i could name a btn "b60" and label it "60"
thus avoiding many headaches.

there are mixed emotions when MC/RR advances
let you throw away code you sweated blood over.

Erik

=====
erik at erikhansen.org    http://www.erikhansen.org

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



More information about the use-livecode mailing list