The selectedObjects - is it a container or not?

J. Landman Gay jacque at hyperactivesw.com
Mon Apr 17 19:39:27 EDT 2017


> I  have a bit of code that says in part:
>
>     if the selectedObjects is not empty then
>       repeat with i = 1 to the number of lines of the selectedObjects
>>
> This results in an error “source is not a container”.
>
> OTOH, if I change the second line to
>
>      repeat with i = 1 to the number of lines of (the selectedObjects0
>
> the code works as expected.


The selectedObjects is a function that returns a text list. It isn't a 
container. Adding parentheses forces the engine to evaluate the function 
and use its return value, which does have lines in it.

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





More information about the use-livecode mailing list