Target and me. Target not the correct value
J. Landman Gay
jacque at hyperactivesw.com
Mon Aug 9 18:05:49 EDT 2004
On 8/8/04 9:16 PM, Matt Denton wrote:
> Confusingly, just 'target' (no 'the') returns the value correctly; 'the
> value of the target' doesn't when there is a duplicate name.
One thing to note is that "target" and "the target" are two different
things. This is a HyperCard construct and has been in xtalk languages
since 1987, so changing it would probably break a lot of stacks.
However, it can be confusing.
"The target" is a function that identifies the object that originated
the message. "Target" refers to the text in the object (usually a field.)
Create a stack with a field, and put this into the card script:
on keydown
put the target && target
pass keydown
end keydown
The above needs refining for actual use, but should give you an idea of
how it all works.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list