Control Ids & Ordinals of Cloned Stacks
Rob Cozens
rcozens at pon.net
Tue Dec 2 09:04:35 EST 2003
Hi All,
Yesterday I was surprised to find that the ids & ordinals of the menu
buttons and other controls of a cloned stack were not the same as
those in the stack it was cloned from. (At least not always, if it
seems to work for you, try modifying the order of the controls in the
source stack before cloning it.)
Apparently, if one uses control id references in stack handlers, one
must be sure never to clone the stack.
I reference menu buttons by id rather than name to support
application translatability. I have had to change the references
from "button id [the id]" to "button [ordinal] of group "myMenubar"
in stacks that can be cloned (plain "button [ordinal]" also resolves
to different controls in the original & cloned stacks).
It seems to me that, ideally, a cloned stack should be identical to
the stack from which it was cloned. If you are expecting this
behavior, be aware it isn't always so.
Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.net/who.htm
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list