Line 6 of fld "test" works but the target does not

J. Landman Gay jacque at hyperactivesw.com
Fri Apr 22 23:29:09 EDT 2016


This is one of those cases where omitting "the" really does matter. (The 
omission of "the" for properties has always bugged me, but it seems to 
be gaining popularity. This particular case will trip you.)

"The target" is an object reference. "Target" is a content reference, 
which works on both fields and buttons. It's an ancient distinction HC 
made and has survived LC's incarnation (for which I'm grateful because 
occsionally I use it.)

In a field containing, say, three lines:

put line 3 of target --> yields text of line 3
put line 3 of the target --> empty; an object reference is only one line

You can do the same thing with a button. For example, in a menu button, 
"line 3 of target" will return the third menu item even if the mouse 
selected a different one.

Swami's script should work if it omits "the": put line 6 of target


On 4/22/2016 9:20 PM, dunbarx at aol.com wrote:
> Hi.
>
>
> The "target" is not the contents of the target. It would be an object reference, like "field yourField".
>
>
> You need, rather
>
>
> put line 6 of the value of the target
>
>
> Craig Newman
>
>
>
> -----Original Message-----
> From: Sannyasin Brahmanathaswami <brahma at hindu.org>
> To: How LiveCode <use-livecode at lists.runrev.com>
> Sent: Fri, Apr 22, 2016 5:59 pm
> Subject: Line 6 of fld "test"  works but the target does not
>
> LC8RC1
>
> I could have sworn this worked before.
>
> If I put this into the msg box
>
> put line 6 of of fld “test”  # locked field that gets mouseup msg
>
> I get “somedata in line 2)
>
> But if I use this in the stack script
>
> put line 6 of the target
>
> It returns empty when you click on the field
>
>
> ??
> _______________________________________________use-livecode mailing listuse-livecode at lists.runrev.comlivecode@lists.runrev.comPlease visit this url to subscribe, unsubscribe and manage your subscription preferences:http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


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





More information about the use-livecode mailing list