mwieder / glx2ScriptEditor

glx2ScriptEditor is an alternative script editor for the LiveCode IDE
MIT License
6 stars 3 forks source link

GLX2 script editor window do not open after LC start although enabled #4

Closed matthiasrebbe closed 4 years ago

matthiasrebbe commented 4 years ago

GLX2 script editor window do not open after LC start although enabled.

After a restart of Livecode the GLX2 script editor windows does not open when pressing "code" icon or selecting "edit script" after right click, although GLX2 is enabled.

After disabling and enabling GLX2 by clicking the GLX2 button on the GLX2 bar, the editor window opens when clicking "code" icon or selecting "edit script" after right click.

This behavior is shown after every start of LC.

mwieder commented 4 years ago

Sorry - I can't replicate the problem here. The mechanics are pretty simple: the script editor subscribes to the "revEditScript" message on preOpenStack. Then any of: clicking the Code button, selecting "edit script" from the contextual menu, or entering "edit the script of..." from the messagebox will send that message to all subscribed plugins.

(grasping at straws...) could there be something in your GLX2 preferences file that's interfering with this? It's working fine for me on both linux and osx.

matthiasrebbe commented 4 years ago

With every new GLX2 version i delete the preference file to make sure there is no problem with it. So that cannot be the problem.

What i forgot to mention in my previous post is that even the LC editor does not open: After a restart of LC with GLX2 enabled the GLX2 bar is black (indicates GLX2 is enabled) and the GLX2 button in the bar is blue(indicates GLX2 not enabled). When trying to open the editor nothing opens. Even not the LC editor. Pressing then the GLX2 button changes color of bar to dark gray/button stays blue. Now the LC editor opens when clicking Code button and so on. Clicking the GLX2 again changes bar to black/button to dark gray. GLX2 then opens when clicking Code button and so on.

matthiasrebbe commented 4 years ago

I´ve found out, why this is happening here. I have DatagridHelper Plugin installed and that plugin is set to be loaded when LC starts. When i changes this setting, so i have to start DatagridHelper om plugin menu, then GLX behaves normal and i am able to use it right away without first switching it off and on.

So it seems there is something in DatagridHelper which prevents GLX to initalise properly at LC start.

mwieder commented 4 years ago

Interesting. I've Got DataGridHelper installed but I have it set to launch from the menu. I just changed it to load automatically and I still can't replicate your problem. I see I've got DGH version 2.1.0 from March 2016. Is that the version you've got?

matthiasrebbe commented 4 years ago

I have 2.6.0 - September 2019 installed.

mwieder commented 4 years ago

Fixed in build 4.1.4e. The order of frontscripts on osx was precluding the editScript message from being handled successfully because an IDE stack was intercepting it before glx2's frontscript could get it. I fixed it by intercepting the editScriptOfObject message and handing it off to a private handler doEditScript. Interesting that the order of frontscripts is platform-dependent.