finding in script

J. Landman Gay jacque at hyperactivesw.com
Mon Jan 3 13:06:28 EST 2005


On 1/2/05 10:59 AM, Alex Tweedly wrote:

 > J. Landman Gay wrote:
 >
 >> On 1/2/05 6:04 AM, Alex Tweedly wrote:
 >>
 >>>  repeat with j = 1 to the number of controls on this stack
 >>>    put "...." & the name of control j & cr after msg
 >>>  end repeat
 >>
 >>
 >>
 >> Be careful with this. "The number of controls of this stack" returns
 >> only the controls on the current card. You have to scan each card for
 >> controls if you want all of them.
 >
 >
 > Thank for the warning - I'll change the script.
 >
 > But - isn't that a bug ?  Shouldn't "the number of controls on this
 > card" return the number of controls on the current card, while "number
 > of controls on this stack" either do what it sounds like it should do
 > :-), or maybe give an error ?

The "number of controls of this stack" isn't a supported command, so 
what is happening is that the engine stops at "number of controls" -- 
and the default in that case is to use the card as a reference.

I suppose it should throw an error, though.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list