Jacque, you’re never wrong! I know really that the ‘the’ indicates a function, but at the same time it’s kind of a trap within the idea that LC scripting is “English-like". For clarity, managing the selected objects is probably better done by something like:
put selectedObjects() into temp then do stuff with ‘temp’, which of course **is** a container. Anyway thanks Graham > On 18 Apr 2017, at 01:39, J. Landman Gay via use-livecode > <use-livecode@lists.runrev.com> wrote: > >> 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 | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode