Target and me. Target not the correct value
ambassador at fourthworld.com
Mon Aug 9 18:28:57 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.
The target returns the long ID, so by itself it's an unambiguous unique
The problem doesn't appear to be with the target; it seems to be a
side-effect of the IDE naming objects for you using a name that also
evaluates to a valid object descriptor (e.g., "field 1").
If you simply get the target you should be fine. You don't need to
evaluate it, which is where it seems the problem is, since the name of
the object evaluates to a descriptor for another object.
If you want to specify the text of the target you can use the
get the text of the target
Try changing the name to something that isn't also a valid object
descriptor and your script may work just fine as is. If not, try simply
getting the text of the target and it'll work well. But either way,
you'll find the target is a reliable absolute reference when used
without the value function.
Who wants to post a Bugzilla request to have the IDE use default names
for objects that are not also valid object references? Perhaps better
still, why not just leave the name empty until the user adds one?
Fourth World Media Corporation
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the Use-livecode