language syntax question

Sean Cole (Pi) sean at pidigital.co.uk
Wed Nov 19 14:35:49 EST 2014


Hi Mike

Issue 1-
Get is for parameters which 'word' is not. So you would use 'put' rather
than 'get'. Get works well for formattedRect. To use 'get' for getting the
word 1 of 'obj' you would do this:

Get word 1 of line pl of the text of obj

because 'the text' is a parameter of your 'obj'



Issue 2-
With send, you don't need to add the @ suffix. When you use it on the input
of your handler (i.e., on doit @thevar) it is effectively referencing it to
the same mem-space of the passed variable 'thevar'. So you would just use
'send "another" & thevar in 1 sec' but still use the @ suffix in your next
handler (i.e., on another @thevar).

Hope this helps you out.

All the best

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
+44(1634)402193
+44(7702)116447
π
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

This email and any files transmitted with it may be confidential and are
intended solely for the use of the individual to whom it is addressed. You
are hereby notified that if you are not the intended recipient of this
email, you must neither take any action based upon its contents, nor copy
or show it to anyone. Any distribution, reproduction, modification or
publication of this communication is strictly prohibited. If you have
received this in error, please notify the sender and delete the message
from your computer.



Any opinions presented in this email are solely those of the author and do
not necessarily represent those of Pi Digital. Pi Digital cannot accept any
responsibility for the accuracy or completeness of this message and
although this email and any attachments are believed to be free from
viruses, it is the sole responsibility of the recipients.


Pi Digital Productions Ltd is a UK registered limited company, no. 5255609.
VAT GB998220972

On 19 November 2014 18:57, Mike Doub <mikedoub at gmail.com> wrote:

> i have been struggling with a couple of language issues and I hope some one
> can set me straight.
>
> Issue 1).  What is the syntax to get the contents of a field when you have
> the long IDE to the field.
>
> Put something ( long ID of field "foo", 2) into x
> ...
>
> Function something obj pl
>     Get the formattedrect of line pl of obj -- this works fine
>     Get word 1 of the text of line pl of obj -- this what I want to do but
> the syntax is wrong
> End something
>
>
> Issue 2). Can a reference to a variable be passed thru the message path
> with a send command?
>
> Local foo
> Put "stuff" into var
> doit var
> ...
>
> On doit @thevar
> Put "ed" after thevar
> -- here I want to send the reference to another handler
> Send "another" & @thevar   In 1 second-- this is where I want the reference
> to be sent and I
>  --  know the syntax is wrong
> End doit
>
> On another @thevar
> If thevar = "stuffed" then answer "it worked"
> End another
>
>
> Regards,
>
>      Mike
> _______________________________________________
> 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