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

J. Landman Gay jacque at hyperactivesw.com
Sun Apr 24 01:13:21 EDT 2016


Addendum: If I use "put target" instead of "put line 2 of target" I get 
what you got, Kay. It returns the name. So apparently it requires 
forcing text evaluation, which is what "get line 2 of target" does.

Interesting.

On 4/24/2016 12:05 AM, J. Landman Gay wrote:
> On 4/23/2016 8:01 PM, Kay C Lan wrote:
>> On Sun, Apr 24, 2016 at 2:57 AM, J. Landman Gay
>> <jacque at hyperactivesw.com>
>> wrote:
>>
>>> > But it does work on buttons contrary to what the dictionary says.
>>> >
>>> > That's not what I'm seeing in 7.1.4 rc2 or 8.0 rc1.
>
> I'm using 8.0rc1 but it should work in earlier versions. The buttons
> need to contain content, and it only works on buttons that accept
> content. So it will work on standard, rectangle, and menu buttons
> (including tab buttons,) for example, but not radio or checkbox buttons.
>
> The menu buttons are pre-loaded with placeholder content and I filled
> the others. I have a field with this text:
>
> Line one
> Line two
> Line three
>
> and populated the empty buttons this way: put fld 1 into btn <whatever>
>
> No buttons have scripts. In the card script:
>
> on mouseUp
>   put line 2 of target
> end mouseUp
>
> Regardless of what you select in the menu buttons, the message box says
> "Choice two". The same happens for fields and non-menu buttons, which
> return "Line two".
>


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




More information about the use-livecode mailing list