The selectedObjects - is it a container or not?
Graham Samuel
livfoss at mac.com
Mon Apr 17 15:07:13 EDT 2017
I have a stack where the user is allowed to select vector objects. For this example, let’s assume some objects are already selected.
I am using LC 8.1.4 rc1 on a Mac running Sierra, and 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.
If I execute in the message box:
put the number of lines of the selectedObjects
I sometimes get no result and sometimes “source is not a container”, but if I change the line to:
put the number of lines of (the selectedObjects)
I always get the right answer.
Am I being stupid, or is this a bug?
Graham
More information about the use-livecode
mailing list