Hey ho.

Just found a small discrepancy: the 'me' function will always return the correct object, however 'the target' will only return the name of the object. This becomes an issue if you, like me, sometimes duplicate an object and forget to give it a unique name. Create a button, put this script in it:

on closeField
put the value of me
end closeField


Now duplicate (or option-drag) a copy. Change text in the field, notice the correct values are reported back to the msg window. Now change BOTH scripts to:

on closeField
  put the value of the target
end closeField

... this reports incorrectly, only reporting 1 field (the first found with the name 'Field 1'). I kinda remember in my dim past that HyperCard would always return the target value correctly, even with object name duplication?

Confusingly, just 'target' (no 'the') returns the value correctly; 'the value of the target' doesn't when there is a duplicate name. Small, simple, but had me stumped for a bit. As you might expect, 'put the value of (long ID of the target)' works. Of course avoiding duplication is good practice; not trusting 'the target' is safest if you can't guarantee unique field/group/button etc names.

I'd like to see 'the target' use the long ID for object referencing, but use the name of the target (as it does now) when used for display. Is that possible? Anyone agree?

Bye

M@
Matt

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to