repeat with messages
dsc at swcp.com
Fri May 16 22:31:33 EDT 2014
Well, yeah, normally it is paired, but this is just a trick. If there is really a “paint now” command, I’d use that. The trick doesn’t seem to work any more. I have to use wait and a wait takes a while. The way to minimize that is to avoid waiting each time through the loop but only wait when there is an interesting change in what is displayed.
Is “with messages” really required to get the screen to update?
But whether it is wait or unlock screen it is not explicit.
I usually use send, so this issue comes up only with a few quick and dirty scripts.
On May 16, 2014, at 6:06 PM, Richard Gaskin <ambassador at fourthworld.com> wrote:
> Dar Scott wrote:
> > So what is the right way to make the screen update? At one time we
> > could use ‘unlock screen’ but that doesn’t seem to work any more.
> > Or am I remembering wrong?
> IIRC each "unlock screen" is paired with a "lock screen" so calling both should work, or using "go this card".
> But that's for static screens. In a loop that'll cause all controls to re-render, which is probably more overhead than you want.
> So within a loop, until the Cocoa build (6.7) is released we still have to add "wait 0 with messages" to get updated controls to render properly on OS X.
> > And about the compiler… I file a lot of bug reports but reporting
> > every time the compiler does not complain about bad syntax seems
> > excessive to me.
> That's a good question.
> A while back I had a circumstance in which a string that had only leading quotes but no closing quotes compiled without issue, and since it was in a complex set of concatenations it took me a while to pin down why it wasn't working. I filed a report on it, and they fixed it a few hours later.
> I rarely notice things it doesn't catch unless they cost me time, so I just ran a test expecting this to fail:
> wait "Several Minutes" without messages
> ...yet it compiled without complaint.
> Offhand that would seem something the compiler should catch, since "wait" only works if the time is specified as an integer. But maybe I'm wrong: is there a way to use a string literal with the "wait" command?
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> Ambassador at FourthWorld.com http://www.FourthWorld.com
> 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