how to list what fields are in a stack?

Rob Cozens rcozens at pon.net
Tue Jan 22 12:42:00 EST 2002


>I have a bunch of fields that are dynamically created
>in a script to label a graph.  I was wondering what
>the best way was to delete these fields each time so
>that I may recreate them in a subsequent running of
>the script.  There can be varying number of fields
>each time and they are created with a nmaing
>convention of "DynamicField"&fieldNum...I guess I am
>looking for a function that returns the names of the
>fields in a stack, similar to the openStacks()
>function...thank you in advance.

Hi Mike,

If all the fields are created on a single card, this might be easier:

Assuming permFieldCount = the number of fields that remain permanently on
the card,

	repeat with x = permFieldCount+1 to the number of fields
	  delete field x
	end repeat

should do what you want.

PS: I'm still just getting into Transcript; so take this as an algorithm,
not a literal  script.
Where but America can the person who lost the popular vote become President
without a coup?



More information about the use-livecode mailing list