Problem with openStack

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Jozwolf
Posts: 6
Joined: Sat Jul 29, 2006 8:32 am

Re: Problem with openStack

Post by Jozwolf » Thu Jan 02, 2014 1:29 am

Hi Craig,

It is odd that it has got better for you, while it reliably replicates for me. To repeat there are two handlers as below. Problem reliably replicates by quitting IDE, then re-starting IDE with the script by double clicking on the test script.

As before Test Handlers are:

Button Test

Code: Select all

on mouseUp
   ask "Got it"
end mouseUp
MainStack

Code: Select all

on openStack
   answer "Answer me" with "Yes" or "No"
    send "mouseUp" to button "Test" of card id 1002
   ask "mouseUp sent to button Test"
end openStack
The problem is resolved by doing as Hermann suggested and adding into the first card script

Code: Select all

on preopenstack
send "choose browse tool" to me in 1 tick
end preopenstack
For my purposes it's a great work-around. But I agree it still begs a thorough explanation. To me it suggests that the IDE is interfering with messages all the way to choosing the pointer tool or behaving differently on startup when the pointer tool is selected, as Hermann suggested. Given replacing the 'send "choose browse tool" to me in 1 tick' with 'wait 60 seconds' does nothing but cause the IDE to hum and haw on startup with its startup panel showing for the 60 seconds the problem does not seem to be a simple timing problem as you suspected.

Well, I know nothing about the construction of the IDE, but it is still an oddity (and perhaps a little worrying in a calm sort of way!)

It is even odder that you are getting first intermittent display of the problem and then it has self-'fixed' while mine is reliably not working. That suggests the platform might have something to do with it. And also it does reinforce your view that timing has SOMETHING to do with it. My machine is the latest and greatest MacBook Pro (retina) with 1 TB of solid state memory and with the fastest processor, so whatever it does it does FAST (by Mac standards). Not sure what platform you are using. But it might be relevant to timing.

Well thats all I can add - more or less a review of the situation as I understand it. It remains a puzzle I think.

Warm good wishes.

So far 2014 seems quite nice :-)

Jim

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10356
Joined: Wed May 06, 2009 2:28 pm

Re: Problem with openStack

Post by dunbarx » Thu Jan 02, 2014 4:49 am

Jim.

I was hoping that Jacque would just figure this out.

I am on a MacBook Air OSX 10.6.8. LC 6.5.1. Maybe this is pertinent...

Craig

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Problem with openStack

Post by [-hh] » Thu Jan 02, 2014 6:22 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 1:39 pm, edited 1 time in total.
shiftLock happens

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7394
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Problem with openStack

Post by jacque » Thu Jan 02, 2014 7:28 pm

Right, Hermann found it. The IDE takes over much of the message queue when it starts up. Dialogs are locked out. Lots of other things are locked out too until all the libraries, stacks, and other components the IDE needs are loaded.

My original suggestion was for changing the tool, but the same method applies for triggering buttons. Instead of using "answer" directly in the openstack handler, create a handler that shows the dialog and send that command from the openstack handler in 1 tick.

Just a quick note about "ask" and "answer" in general -- ask is for retrieving user input, answer is for relaying information. It may be that your test scripts don't reflect what the real ones do, but from what I see here you only need "answer".

Since "ask" waits for user input and in general needs to do something with that input, I can understand why it is blocked during startup. A handler that tries to work with data using any built-in LiveCode functions that haven't loaded yet would fail.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10356
Joined: Wed May 06, 2009 2:28 pm

Re: Problem with openStack

Post by dunbarx » Thu Jan 02, 2014 8:06 pm

All good stuff, Hermann and Jacque.

But I have this test running just fine, as Jim originally set it up. It used not to work, and now it does, on two different machines. One running OS 10.5, one 10.6.

Jim still has the problem. His machine is faster than mine.

Matters not if I use "ask" or "answer". There is something going on. I assume LC did not learn how to appease me.

Craig

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Problem with openStack

Post by [-hh] » Thu Jan 02, 2014 10:35 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 1:39 pm, edited 1 time in total.
shiftLock happens

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10356
Joined: Wed May 06, 2009 2:28 pm

Re: Problem with openStack

Post by dunbarx » Fri Jan 03, 2014 12:40 am

Hermann.

Sort of. I am just a little miffed at the fact that I cannot reproduce what I very recently struggled with. I am on the same machine, same set-up, same everything. This is not the first time I have found myself getting unstuck without seemingly doing anything in particular to fix a problem. I know for a fact that many times I am the cause. But I also know that sometimes LC (and HC before it) just fixed themselves.

In this case, I had inserted an "if" statement in a certain spot in the openStack handler to see if the card had loaded. I just asked for the name of the current card. It had indeed loaded. From that moment (I deleted the "if") it never failed again.

Could still be me, I suppose...

Craig

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Problem with openStack

Post by [-hh] » Fri Jan 03, 2014 2:38 am

..........
Last edited by [-hh] on Wed Aug 13, 2014 1:39 pm, edited 1 time in total.
shiftLock happens

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10356
Joined: Wed May 06, 2009 2:28 pm

Re: Problem with openStack

Post by dunbarx » Fri Jan 03, 2014 7:18 am

Hermann.

I thought I had to find some sort of playfulness or make some sort of joke in order to earn the second. Have not found an opening recently...

Craig

Post Reply