cursor blinking in Script Editor, but, you're not there...

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

cursor blinking in Script Editor, but, you're not there...

Post by billworld » Tue Nov 11, 2008 8:04 pm

Okay, I'm going to vent...

It happened again! I spent the last 30-40 minutes carefully laying out multiple elements within a group and going back-and-forth carefully to the Script Editor to change scripts. There were several moments of confusion as I saw the blinking cursor within the SE but when I typed, nothing happened.

I then explicitly clicked on the SE (either once or possibly a couple of times) and then was able to see what I typed be inserted at the cursor location. Okay, fine, I was dealing with this... HOWEVER, I just made the mistake of typing delete into the SE at the blinking cursor point, and, you guessed it, all the stuff on my layout I was designing which was contained in a group got deleted. It took me a few moments to realize that this occurred. Of course, the first thought is that it's hidden, etc. Nope, this puppy has been fully deleted.

I've already gotten accustomed to saving every time before going to the Edit Group command as this has caused RR to crash MANY times on me.

Looks like I now need to get in the habit of saving even before going into the SE.

Seriously, this is beginning to feel like walking on eggshells...

Surely I'm not alone in this regard?

I'm not sure exactly what the circumstances are which cause the cursor to blink in the SE even when apparently you're actually not truly focused on it. I think this is related to issues with the find field in the Dictionary doing the exact same thing. The cursor blinks, you think you're there, you type, nothing happens. JUST DON'T DO LIKE I DID AND HIT THE DELETE KEY, YOU'LL DELETE THE LAST THING YOU HAD SELECTED REGARDLESS OF THE BLINKING CURSOR STATE!

(Sorry for the yelling...)

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Post by malte » Tue Nov 11, 2008 8:19 pm

I feel your pain. When stuff like this happens it is horrible. As I do not use the build in Script editor, but the glx script editor I have not been bitten by that yet.

Hope you are not too frustrated yet. Once you know where the glitches are, Re is a very good product. But glitches it has a few. No need to beat around the bush there. The only thing you can do is to report to the qa center and discuss it with your peers here and over at the use rev list. Maybe issues like that are even better discussed at the use list, as it still is much more frequented then the forums. (I prefer the forums, but still most old hands are on the lists), so it is worth to check there too, to get some headups and workarounds/fixes for glitches like the one you are experiencing.

Cheers,

Malte[/url]

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Post by trevordevore » Tue Nov 11, 2008 9:22 pm

What is most likely happening is that the Revolution engine is becoming confused. Even though a field is the focusedObject and visually has focus the 'selectedField' property will return empty and keyboard events will not reach the field. In your case the keyboard event was handled by the IDE and you deleted the currently selected object.

This issue used to be more widespread but the engineers have fixed the majority of the causes. Some bug reports that will give you some background:

http://quality.runrev.com/qacenter/show_bug.cgi?id=5497
http://quality.runrev.com/qacenter/show_bug.cgi?id=5692
http://quality.runrev.com/qacenter/show_bug.cgi?id=6058

I know there are a couple of cases left where the engine becomes confused and perhaps the new Script Editor in 3.0 exposes one. One example that I just came across the other day:

http://quality.runrev.com/qacenter/show_bug.cgi?id=7414

One way to verify that a confused engine is indeed the cause is to use a plugin I created for tracking these issues down. The plugin continually displays the currently focusedObject and the selectedField. If the focusedObject is a field and the selectedField is empty then the plugin displays a little alert and you know you have confused the engine. The plugin is also helpful when you want to ensure that the proper controls are getting focus when you expect them to.

You can download the plugin at the following url. Just install it in your plugins directory and open it using Development > Plugins > ReportTheFocusedObject.

http://www.bluemangolearning.com/develo ... object.zip

If you can come up with a case where you can reliably confuse the engine then the engineers should be able to fix it.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Tue Nov 11, 2008 10:56 pm

Thanks Trevor. I'll install the plug-in and track things with that. Knowing the state objects are in (for both the developer and the IDE) is the #1 problem I believe with the RR IDE. Sounds like your tool helps the developer in that regard, and if it can help to isolate when the IDE gets confused, then that should help fix the problem. I'll report back if I can generate a reproducible test case.
trevordevore wrote: One way to verify that a confused engine is indeed the cause is to use a plugin I created for tracking these issues down. The plugin continually displays the currently focusedObject and the selectedField. If the focusedObject is a field and the selectedField is empty then the plugin displays a little alert and you know you have confused the engine. The plugin is also helpful when you want to ensure that the proper controls are getting focus when you expect them to.

You can download the plugin at the following url. Just install it in your plugins directory and open it using Development > Plugins > ReportTheFocusedObject.

http://www.bluemangolearning.com/develo ... object.zip

If you can come up with a case where you can reliably confuse the engine then the engineers should be able to fix it.

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Tue Nov 11, 2008 11:27 pm

I've read good things about the GLX2 tools, but, there's an unwillingness over there to provide a try-before-you-buy version and I have an inherent unwillingness to buy-before-I-try.

I've purchased lots of software in my days and feel strongly that regardless of price, one should be able to try-before-you-buy, esp. for developer tools.
malte wrote:I feel your pain. When stuff like this happens it is horrible. As I do not use the build in Script editor, but the glx script editor I have not been bitten by that yet.

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Wed Nov 12, 2008 6:16 pm

Okay. Here it is! (Didn't take that long.) And, it's incredibly simple.

1. Create a new stack
2. Place a button on the new stack.
3. Right click button, select Edit Script to go to Script Editor
4. Start typing at the blinking cursor. Text should be entered just fine as expected.
5. Go back to stack as focused window (click on window title bar or on any area of card).
6. Right click button, select Edit Script to go to Script Editor
7. You'll see the cursor blinking in the Script Editor, however, the SE window is NOT in focus. IF YOU TYPE DELETE, YOU WILL DELETE THE BUTTON ON THE STACK RATHER THAN DELETE THE TEXT IN THE SCRIPT EDITOR.

Note: The ReportTheFocusedObject tool IS showing a discrepancy between the focused name and the selected field name.

Can someone else please confirm that these steps exhibit the same behavior (to make sure there's not some plug-in on my system causing a conflict)? I have GXL2 tools inspector, BVG docu and Navigator plugins going right now. Thanks.
trevordevore wrote: If you can come up with a case where you can reliably confuse the engine then the engineers should be able to fix it.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Post by trevordevore » Wed Nov 12, 2008 6:33 pm

I followed your steps on OS X and Windows but don't experience the problem. I don't have the same plugins running as you do though. Could you try the same steps with no plugins running? Also, what platform are you testing on?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Wed Nov 12, 2008 8:04 pm

I'm on the latest Mac OS X.

I took out all plug-ins and added them one-by-one. The only other plugin that was previously running that I failed to mentioned in the previous post is the ReportTheFocusedObject plugin.

Anyway, here's what I've come up with so far. After adding the plug-ins back one-by-one as well as collectively, I can't precisely reproduce the steps I had just posted (which I tested a few times, each time quitting and re-launching the app). I can't explain that.

HOWEVER, I am seeming a highly related issue (with the same net effect) caused by the revGLX2 Code plugin. Namely, if you right click on a button and then select "Edit Script", there's a VERY good chance your mouse is now located outside of the button. The net effect is as follows:

1. The Sript Editor window comes into focus and you see the blinking cursor for a blip of a moment.
2. Then you see window flash and the blinking cursor is gone (although the SE window is still the window in focus)
3. ReportTheFocusedObject reports that the SE window is in focus but reports that no field is selected.

Okay, this isn't EXACTLY related to the issue I was reporting, however, it has the same net effect in that at step #3 if I hit the delete key I will delete the button which is odd as the current window in focus is the SE window not the window containing the button!

Again, I cannot explain why in previous tests there was most certainly a pervasive blinking cursor in the SE window with the SE window NOT in focus. I've also seen it where the SE window IS in focus AND the cursor is blinking, but still typing yields no text in the SE. If I can get a steadily successful and reproducible test case for that behavior, I'll be sure to post it. Currently, I suspect something related to the order in which plug-ins are loaded may affect whether or not these additional cases rear their ugly head. Is that at all plausible? That would require different testing that is much more involved.

Can you kindly confirm that with just the GLX2 Code plugin running you can reproduce the steps above on Mac/Win?

Thanks

Bill

trevordevore wrote:I followed your steps on OS X and Windows but don't experience the problem. I don't have the same plugins running as you do though. Could you try the same steps with no plugins running? Also, what platform are you testing on?

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Post by trevordevore » Wed Nov 12, 2008 8:19 pm

I have seen the behavior you describe when working with GLX2 (I only use GLX2 myself) but I am not able to reproduce the issue just by following the steps you outlined.

The problem with these field issues is that the remaining cases are caused by some odd interaction or organization of controls and windows. This makes it difficult to create an easy to produce recipe.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Wed Nov 12, 2008 9:29 pm

Are you using just the revGLX2 code plugin WITHOUT the associated GLX2 script editor and/or vis app. browser?

When right-clicking to select Edit Script, are you sure the mouse is outside of the initial button area?

With only a single stack/window open, I see the described behavior every time. It appears that GLX2 throws off the focus/selection. Anyway, that's what's occurring with the version of revGLX2 code I have installed. Maybe you have a different version?

Long and short is I'm going to have to disable this plug-in. While it's nice for seeing the names of objects and gathering the current state of where you think you are, it clearly is screwing up interaction with the built-in Script Editor. As soon as the mouse gets moved away from the object that was right-clicked on to go to the SE, the blinking cursor in the SE goes away (but the SE window stays in focus).

BTW, just how do I determine what version of the revGLX2 code plugin I have installed?

Does anyone else see this?

Thanks

Bill
trevordevore wrote:I have seen the behavior you describe when working with GLX2 (I only use GLX2 myself) but I am not able to reproduce the issue just by following the steps you outlined.

The problem with these field issues is that the remaining cases are caused by some odd interaction or organization of controls and windows. This makes it difficult to create an easy to produce recipe.

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Wed Nov 12, 2008 9:35 pm

Clicking around I just discoveerd Control-Enter takes one to the GLX2 Home page which shows the current version I have installed as v2.2r4.
billworld wrote: BTW, just how do I determine what version of the revGLX2 code plugin I have installed?

trevordevore wrote:I have seen the behavior you describe when working with GLX2 (I only use GLX2 myself) but I am not able to reproduce the issue just by following the steps you outlined.

The problem with these field issues is that the remaining cases are caused by some odd interaction or organization of controls and windows. This makes it difficult to create an easy to produce recipe.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Post by trevordevore » Wed Nov 12, 2008 9:41 pm

Sorry, I missed your question about checking the version. When the GLX2 editor is the window in front you can go to Revolution > About GLX2 and the version appears in the top-right corner. I am running the latest beta which is 2.4b1.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Wed Nov 12, 2008 10:08 pm

I'm looking for a not finding that beta on the Web site for GLX2. Does that only go to folks who have purchased the GLX2 package?
trevordevore wrote:Sorry, I missed your question about checking the version. When the GLX2 editor is the window in front you can go to Revolution > About GLX2 and the version appears in the top-right corner. I am running the latest beta which is 2.4b1.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Post by trevordevore » Wed Nov 12, 2008 10:12 pm

I'm not sure. In the version I have if GLX2 is the front window then you can click on Help > Check for latest beta... and the latest beta is automatically installed.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Nov 12, 2008 10:27 pm

Hi Bill,

I sympathise with you. This kind of things happen to me too and it is really frustrating. Unfortunately, I don't have a fail-safe solution for you. I can only ask you to try to find a good recipe and report it to the QCC if you find one.

On a similar note, it often happens to me that I *think* I'm deleting the name of an object in the property inspector, while I'm actually deleting the object itself (togethet with its scripts). The reverse happens too: I try to use the arrowKeys to nudge an object up or down and notice that I'm moving the text insertion point around instead. It also happens with the mesage box, when I see the cursor blinking and try to type, but the key presses appear to go into the void.

Just be careful and in case of doubt, deselect and make sure that only one object has focus.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”