WorkFolow oddity

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

WorkFolow oddity

Post by dunbarx » Fri Mar 05, 2021 8:45 pm

This has happened to me now and then forever, and to others as well.

I have a handler that sends a "mouseUp" message to a button. That button has an "ask dialog line in its "mouseUp" script.

If I simply run the handler, all works fine, but with no blinking cursor in the dialog; I have to click manually to continue.

But if I place a breakPoint anywhere in the flow of the button script before the "ask" line, and simply continue from there, the ask dialog always appears with a blinking cursor.

It is a minor inconvenience. but a major mystery for me.

Reproducible, finally, if that matters.

Craig

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: WorkFolow oddity

Post by jacque » Sat Mar 06, 2021 7:35 pm

My guess: A breakpoint allows the engine to catch up because it breaks the flow of messages and effectively creates an idle period. Try adding a "wait 0 with messages" and see if that gives LC a chance to do its default behavior.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: WorkFolow oddity

Post by dunbarx » Sat Mar 06, 2021 8:00 pm

Jacque.

I think you recommended something like that, to me, a long time ago. But I do this in other places and the blinking cursor appears just fine. But I will try it anyway on Monday.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: WorkFolow oddity

Post by FourthWorld » Sat Mar 06, 2021 8:37 pm

Does the issue occur if you click the button containing the mouseup handler directly, or only when using "send" to that?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: WorkFolow oddity

Post by dunbarx » Sun Mar 07, 2021 12:17 am

Richard.

Clicking the button with the "ask" command always works fine, as it should. I just whipped up a simple stack with a button that sends"mouseUp" to another button with an "ask" command. The blinking cursor appears normally.

I have a sneaking feeling that Jacque's suggestion will fix it in my project at work. I just do not know why.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: WorkFolow oddity

Post by dunbarx » Wed Mar 10, 2021 10:50 pm

Jacque wrote:
My guess: A breakpoint allows the engine to catch up because it breaks the flow of messages and effectively creates an idle period. Try adding a "wait 0 with messages" and see if that gives LC a chance to do its default behavior.
It does not. Again, this:

Code: Select all

click at the loc of fld "myField"
works fine from the msg box, but not at all as the last line of a handler.

To recap, I can click on the field, and a normal dialog appears with a blinking cursor. I can set a breakpoint in either the calling handler or the field script, and the dialog appears normally, after I manually continue program flow. But if I let the process run by itself, no cursor ever appears.

If I make a brand new stack, the process works just fine. So there is something in my real stack that prevents it.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9567
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: WorkFolow oddity

Post by dunbarx » Thu Mar 18, 2021 11:20 pm

Well, if I lock messages, and DO NOT unlock them, the blinking cursor works just fine. Why this should be so is a mystery to me.

Craig

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: WorkFolow oddity

Post by jacque » Fri Mar 19, 2021 6:10 pm

That implies there's something in the scripts that's removing the cursor or resetting the focus. I had to solve a similar issue yesterday where a list field did not retain its hilitedline. It took me an hour to track it down.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Talking LiveCode”