AW: isn't it it?
Tiemo Hollmann TB
toolbook at kestner.de
Tue Nov 12 09:19:14 EST 2013
Sorry, the issue is not the "it", but a combination of my misunderstanding
of the local handling and the loop until. First I thought the loop until
condition was tested at the end of the loop. Second with strict compilation
mode off and not having declared the local, the variable obviously isn't
recognized as "empty" and therefore the loop starts. With strict compilation
mode on and declared local, the local is empty and the loop doesn't starts.
# local tLoop
repeat until tLoop is empty
put it into tLoop
> -----Ursprüngliche Nachricht-----
> Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im
> von Tiemo Hollmann TB
> Gesendet: Dienstag, 12. November 2013 14:19
> An: 'How to use LiveCode'
> Betreff: isn't it it?
> I have a "repeat until it is empty" loop which suddenly didn't started
> By chance I found the bug. Some days ago my IDE with strict compilation
> mode on wanted me to declare the variable "it". Though it is not usual, I
> didn't wanted to care about it and declared a local "it" and the IDE was
> Actually I don't remember, where else I have done this nonsence.
> Now I found that a "repeat until it is empty" loop doesn't start anymore
> you declare the local variable it. You can see it with this simple
> just comment / uncomment the local:
> on mouseUp
> # local it
> repeat until it is empty
> ask "what?"
> end repeat
> end mouseUp
> Why does LC handles "it" different if it is declared or not? And why
> doesn't start the repeat loop anymore if it is declared but empty? Any
> light on this?
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode