How do you do it??

Bob Sneidar bobs at twft.com
Tue Dec 27 12:08:20 EST 2011


Please go back and read the emails set to explain why it will not work. You may have passed over them in frustration. In the below example (which is not like the first example you provided) you still have the same problem. You are concatenating a DO statement with a multiple line value. So if fld 1 contained:

test1
test2

then your DO statement would look like

put test1
test2 into fld 2

Now the compiler will try to compile that as a single script before executing it. It "gets" the first command "put test1" which if executed on it's own will put the literal value "test1" into the message box. . It does not however "get" the next line "test 2 into fld 2". See? That will not compile. Try it. Type only "fld 1 into fld 2" into the message box and see what you get. 

Now why would you concatenate a DO statement in this situation anyway? It's pointless. Just: 

put fld 1 into fld 2

Why create a DO statement to do that? 

Bob


On Dec 23, 2011, at 3:00 PM, DunbarX at aol.com wrote:

> Mike.
> 
> 
> Not sure I am getting this. I have two fields, one with several lines of text ("fld 1").
> 
> 
> on mouseUp
>  put fld 1 into foo
>  do "put" && foo && "into fld 2"
> end mouseUp
> 
> 
> This fails. If fld 1 contains only one line, no problem, as everyone but me seems to know. Please tell me again. 
> 
> 
> Thanks,
> 
> 
> Craig
> 
> 
> 
> -----Original Message-----
> From: Mike Bonner <bonnmike at gmail.com>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Sent: Fri, Dec 23, 2011 12:42 pm
> Subject: Re: How do you do it??
> 
> 
> Well yeah because "do" is a unit.  part fails, all fail so the AA never
> gets to the msg box. Explanation still stands though.
> 
> 
> On Fri, Dec 23, 2011 at 3:29 PM, Bob Sneidar <bobs at twft.com> wrote:
> 
>> It won't even put AA into the message box. It will try to compile the
>> entire do statement first, and upon failing will just throw an error.
>> 
>> Bob
>> 
>> 
>> On Dec 23, 2011, at 1:58 PM, Mike Bonner wrote:
>> 
>>> put AA
>>> BB into temp2
>>> So it will put AA into the message box, and error out on the next line
>>> since there is no handler named BB
>> 
>> 
>> _______________________________________________
>> 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
>> 
> _______________________________________________
> 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
> 
> 
> 
> _______________________________________________
> 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





More information about the use-livecode mailing list