Levure confusion

Collaborate on tools, libraries, and applications beyond the IDE

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
amn
Posts: 4
Joined: Thu May 11, 2017 6:33 pm

Levure confusion

Post by amn » Sat Feb 02, 2019 8:37 pm

Hi,

My levure app (once glx…) starts properly in the IDE, but the standalone throws no errors that I can see, remains running, but never becomes visible onscreen. My rudimentary logfile shows the same entries regardless of Ide or standalone. Is there anything else I can check to see why this might be happening?
IDE
[Sat, 2 Feb 2019 14:09:48 -0500] PreOpenWindow-entered (First/Ide)
[Sat, 2 Feb 2019 14:09:48 -0500] PreOpenWindow-done
[Sat, 2 Feb 2019 14:09:49 -0500] PreOpenView-entered (First/Ide)
[Sat, 2 Feb 2019 14:09:49 -0500] PreOpenView sees levureApplicationState: loading
[Sat, 2 Feb 2019 14:09:49 -0500] PreOpenView-done
[Sat, 2 Feb 2019 14:09:51 -0500] ResizeView-entered
[Sat, 2 Feb 2019 14:09:51 -0500] ResizeView-done
[Sat, 2 Feb 2019 14:09:51 -0500] OpenWindow-entered (First/Ide)
[Sat, 2 Feb 2019 14:09:54 -0500] OpenWindow has initiated tsNet operation
[Sat, 2 Feb 2019 14:09:54 -0500] btnAppInit-entered
[Sat, 2 Feb 2019 14:09:54 -0500] resolveDB-entered
[Sat, 2 Feb 2019 14:09:54 -0500] resolveDB-done
[Sat, 2 Feb 2019 14:09:54 -0500] btnAppInit-done
[Sat, 2 Feb 2019 14:09:54 -0500] OpenWindow dispatched btnAppInit with result: handled
[Sat, 2 Feb 2019 14:09:54 -0500] OpenWindow processed license
[Sat, 2 Feb 2019 14:09:54 -0500] OpenWindow loaded homescreen Browser URL
[Sat, 2 Feb 2019 14:09:54 -0500] OpenWindow set FolderLevel
[Sat, 2 Feb 2019 14:09:54 -0500] OpenWindow-done
[Sat, 2 Feb 2019 14:09:54 -0500] OpenView-entered (First/Ide)
[Sat, 2 Feb 2019 14:09:54 -0500] OpenView-done levureApplicationState: loading

standalone
[Sat, 2 Feb 2019 14:34:48 -0500] PreOpenWindow-entered (First/standalone)
[Sat, 2 Feb 2019 14:34:48 -0500] PreOpenWindow-done
[Sat, 2 Feb 2019 14:34:48 -0500] PreOpenView-entered (First/standalone)
[Sat, 2 Feb 2019 14:34:48 -0500] PreOpenView sees levureApplicationState: loading
[Sat, 2 Feb 2019 14:34:48 -0500] PreOpenView-done
[Sat, 2 Feb 2019 14:34:50 -0500] ResizeView-entered
[Sat, 2 Feb 2019 14:34:50 -0500] ResizeView-done
[Sat, 2 Feb 2019 14:34:50 -0500] OpenWindow-entered (First/standalone)
[Sat, 2 Feb 2019 14:34:50 -0500] OpenWindow touches the ng_stack
[Sat, 2 Feb 2019 14:34:50 -0500] OpenWindow sets/broadcasts thePort to 27001
[Sat, 2 Feb 2019 14:34:51 -0500] OpenWindow has initiated tsNet operation
[Sat, 2 Feb 2019 14:34:51 -0500] btnAppInit-entered
[Sat, 2 Feb 2019 14:34:51 -0500] resolveDB-entered
[Sat, 2 Feb 2019 14:34:51 -0500] resolveDB-done
[Sat, 2 Feb 2019 14:34:51 -0500] btnAppInit-done
[Sat, 2 Feb 2019 14:34:51 -0500] OpenWindow dispatched btnAppInit with result: handled
[Sat, 2 Feb 2019 14:34:51 -0500] OpenWindow processed license
[Sat, 2 Feb 2019 14:34:51 -0500] OpenWindow loaded homescreen Browser URL
[Sat, 2 Feb 2019 14:34:51 -0500] OpenWindow set FolderLevel
[Sat, 2 Feb 2019 14:34:51 -0500] OpenWindow-done
[Sat, 2 Feb 2019 14:34:51 -0500] OpenView-entered (First/standalone)
[Sat, 2 Feb 2019 14:34:51 -0500] OpenView-done levureApplicationState: loading

Should the application state still be "loading" at this point? Anyway, thanks for any tips that might be forthcoming.

Allen Morgan

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

Re: Levure confusion

Post by trevordevore » Sat Feb 02, 2019 8:57 pm

Hi @Allen,

Some questions:

1) Did this work before?
2) If it did, what changes have you made since the last time it worked?

Regarding the application state, once "OpenApplication" finishes running then levureApplicationstate() should return "running". If it doesn't then an error is being thrown. Quick way to check - at the end of OpenApplication put an answer dialog that let's you know the code got to the end. Or put all of the code in OpenApplication into a try/catch block.
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

amn
Posts: 4
Joined: Thu May 11, 2017 6:33 pm

Re: Levure confusion

Post by amn » Sat Feb 02, 2019 9:31 pm

Hi,

Thanks for thinking about this on a Saturday. My application was working, with my last additions being turning the "window_manager" helper back on, and refactoring what had become a very disjoint set of handlers performing my startup sequence. Its much cleaner now, but it did introduce the issue I'm seeing (it is a windows standalone). I will try your suggestions, and I really appreciate all the glx/levure work you have given us.

Allen

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

Re: Levure confusion

Post by trevordevore » Sat Feb 02, 2019 9:39 pm

In the message_watcher.livecodescript file you will find the code that manages windows. Because of a bug in versions of LC earlier than 9.0.3 (still in development) the stack window is hidden in preOpenStack. In the windowManager.livecodescript file the window will be shown again in the openCard handler. Does your stack trap the openCard handler? If so, just pass it and the window should show up.
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

amn
Posts: 4
Joined: Thu May 11, 2017 6:33 pm

Re: Levure confusion

Post by amn » Wed Feb 06, 2019 4:19 am

Hi,

Thanks for the insights. I included try/catch in app.livecodescript and do not seem to be getting errors at that level. I could not locate anything of my doing that is trapping or even handling/passing openCard, but something must be. I am ok again after disabling the window_manager helper for now, and will check again at 9.0.3. Just enabling the helper for me on windows executables, and not overtly using it, exhibits the screen not shown.

I must admit I felt some pressure in writing this response, to get it finished before 9.0.3 is released. I'm afraid to look.

Thanks again,

Allen Morgan

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

Re: Levure confusion

Post by trevordevore » Wed Feb 06, 2019 5:33 am

If you wanted to get to the bottom of it you could sprinkle some messages in the `windowManager.livecodescript` `openCard` handler to see if it ever gets called. There is an `if` statement in there so you could verify A) if `openCard` is making it to the `windowManager` script and B) if `set the visible of the owner of the target to true` is being called.
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

Post Reply

Return to “Community Projects”