I have a little trouble with database blocking.
I'll looking for the liveCode equivalent of Visual Basic's 'Do Events'.
I looked in the Dictionary under Refresh. That's not it. Nothing under Pause either.
PS: For some reason when I search this LiveCode forum,
I only gets results for 'do or events' and not for the exact phrase 'do events'.
I tried everything I could think of. Also, any forum tips for searching for an exact phrase?
Do Events: liveCode Equivalent
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Do Events: liveCode Equivalent
What can I say... the forum software sucks.
Anyway, it's been a while since I've had to do any VB code. Can you refresh my memory about "Do Events"? Are you looking for a way to allow a process to yield time to other tasks? If so, can you insert a statement like
the "with messages" allows other pending tasks a chance to breathe.
Anyway, it's been a while since I've had to do any VB code. Can you refresh my memory about "Do Events"? Are you looking for a way to allow a process to yield time to other tasks? If so, can you insert a statement like
Code: Select all
wait for 0 milliseconds with messages
Re: Do Events: liveCode Equivalent
Yeah, that sounds exactly like what I'm looking for.
But it doesn't look like it redraws of the screen?
I've got an Answer dialog that gets hung up until the DB operation is complete.
It looks like this:Works fine. It just looks bad.
But it doesn't look like it redraws of the screen?
I've got an Answer dialog that gets hung up until the DB operation is complete.
It looks like this:
Code: Select all
answer "This process will take a few minutes. Please wait..."
set visible of button "progress" to true
wait for 0 milliseconds with messages
revExecuteSQL pgID, tSQL
put the result into look
set visible of button "progress" to false
if look is not 0 then
etc...
Re: Do Events: liveCode Equivalent
Okay-- got it. Instead of using the Answer box I just created a label field, Status.
And I changed the cursor to an hour glass. Looks much better now.Thanks Mark! That tip on...is good to know about.
And I changed the cursor to an hour glass. Looks much better now.
Code: Select all
put "Please wait..." into fld "status"
set lockcursor to true
set cursor to 1129
wait for 0 milliseconds with messages
revExecuteSQL pgID, tSQL
put the result into look
put empty into fld "status"
set lockcursor to false
if look = 0 then
etc...
Code: Select all
wait for 0 milliseconds with messages