Page 1 of 2
ask command unrecognized with standalone launcher
Posted: Tue May 05, 2015 12:33 pm
by pascalh4
Hello to all.
I tested a standalone launcher with a scritp containing the "ask" command in a livecode app. No windows appears.
Is this normal ? ( launcher works in livecode software)
Code must be differently writing or "ask" command don't works with a standalone launcher?
Pascal
Re: ask command unrecognized with standalone launcher
Posted: Tue May 05, 2015 12:47 pm
by Klaus
Hi Pascal,
did you add (check) ASK and ANSWER DIALOG in the standalone builder settings to be included?
Or are you using the option "Search for required inclusions..."?
Best
Klaus
Re: ask command unrecognized with standalone launcher
Posted: Tue May 05, 2015 5:32 pm
by pascalh4
Hi Klaus.
Neither of them
I just created an .exe standalone launcher:
Code: Select all
on openstack
open stack "essai L.livecode"
close stack "lanc"
end openstack
And this launchs a button command with this code (At least, it is the beginning) :
Code: Select all
on mouseUp
ask "donner un titre"
end mouseUp
But the windows to write text don't appear.
Pascal
Re: ask command unrecognized with standalone launcher
Posted: Tue May 05, 2015 5:40 pm
by Klaus
Hi Pascal,
pascalh4 wrote:Neither of them
come on, what did you exspect then?
You MUST add these stacks to your standalone
or no ASK or ANSWER dialog will ever appear!
Best
Klaus
Re: ask command unrecognized with standalone launcher
Posted: Tue May 05, 2015 7:38 pm
by pascalh4
Hi Klaus.
Well yes! I believed that it was magic.
Seriously, Simon introduced me to the standalone Launcher and, in my first test, the few code lines of the launcher was enough to exploit my livecode app. (see
http://forums.livecode.com/viewtopic.php?f=7&t=24134)
Now if I understood, some functions must be launched in the standalone. How to know which?
Is there any explanation to it on the website?
Pascal
Re: ask command unrecognized with standalone launcher
Posted: Wed May 06, 2015 12:29 pm
by Klaus
Hi Pascal,
The example is VERY, VERY basic and only tries to show the principle behind the "splash stack" approach.
pascalh4 wrote:Now if I understood, some functions must be launched in the standalone. How to know which?
Sorry, don't understand this question?!
Best
Klaus
Re: ask command unrecognized with standalone launcher
Posted: Wed May 06, 2015 8:08 pm
by pascalh4
Hello Klaus
The example is VERY, VERY basic and only tries to show the principle behind the "splash stack" approach.
Exactly it's good for me. I am a basic, very basic beginner.
Sorry, don't understand this question?!
Sorry if I'm not very accurate. I'm not very good in English. If in this case, "answer" must be in the standalone launcher and not in the file.livecode. So I supose that it exist a rule that specify where and when to use this.
Best
Pascal
Re: ask command unrecognized with standalone launcher
Posted: Wed May 06, 2015 8:46 pm
by jmburnod
Hi Pascal,
I understand you want use handlers and function of the standalone from a other stack.
There is some ways to do that.
Setting the mainstack of the stack you open from the standalone is one of them
In this case, all handlers and functions of the stack script of the standalone work.
In this case you can use something like that
Code: Select all
on mouseup
put the short name of this stack into tMainS
answer file "Open..."
if it <> empty then
put it into tStack
open stack tStack
set the mainstack of stack tStack to tMainS
end if
end mouseup
Best regards
Jean-Marc
Re: ask command unrecognized with standalone launcher
Posted: Wed May 06, 2015 9:09 pm
by pascalh4
Thank you Jean Marc
I am going to adapt and test it tomorrow
Good evening
Pascal
Re: ask command unrecognized with standalone launcher
Posted: Thu May 07, 2015 12:43 pm
by Klaus
Hi all,
hm, the idea of making a stack a substack of a standalone in runtime seems very cumbersome to me
I would do just this, which will also work with the externals set in the standalone:
Code: Select all
on openstack
## I think "lanc" is the standalone stack, right?
start using stack "lanc"
## Now all handlers, function and also externals from this stack are available to all other stacks!
open stack "essai L.livecode"
close stack "lanc"
end openstack
Best
Klaus
Re: ask command unrecognized with standalone launcher
Posted: Thu May 07, 2015 5:14 pm
by jmburnod
Hi Klaus,
I have understood Pascal want open a stack from the launcher that is a standalone.
Your script needs the path of the launcher standalone on openstack.
hm, the idea of making a stack a substack of a standalone in runtime seems very cumbersome to me
Thanks for this point. I think use this way to add some simple stacks that use a lot of commands and functions from a standalone.
How can I see how this way is cumbersome ?
Best
Jean-Marc
Re: ask command unrecognized with standalone launcher
Posted: Thu May 07, 2015 5:21 pm
by Klaus
Hi Jean-Marc,
jmburnod wrote:Hi Klaus,
I have understood Pascal want open a stack from the launcher that is a standalone.
Your script needs the path of the launcher standalone on openstack.
No, I just added my line to the standalone stack's (launcher) script, see above, 3rd posting!
jmburnod wrote:hm, the idea of making a stack a substack of a standalone in runtime seems very cumbersome to me
Thanks for this point. I think use this way to add some simple stacks that use a lot of commands and functions from a standalone.
How can I see how this way is cumbersome ?
I said that looks cumbersome to ME!
If it works for you, fine then
The "ususal" way to make a stack's handler etc. available to other stacks is to "start using thatstack".
Best
Klaus
Re: ask command unrecognized with standalone launcher
Posted: Thu May 07, 2015 6:09 pm
by jmburnod
Hi Klaus,
No, I just added my line to the standalone stack's (launcher) script, see above, 3rd posting!
I never thought that a stack can set starting use itself
Thanks again
Jean-Marc
Re: ask command unrecognized with standalone launcher
Posted: Sat May 09, 2015 6:32 am
by SparkOut
That is a great tip Klausimausi, I never realised that "start using" the launcher would pass availability of all the externals, dialogs etc too.
Re: ask command unrecognized with standalone launcher
Posted: Sat May 09, 2015 10:22 pm
by pascalh4
Hi everybody.
I am happy that my question may interest many person.
But I must be stupid because for me, even with code line "start...", it doesn't work.
The standalone launcher opens the livecode file, but the window to display the text does not appear.
It isn't very important for what I am trying to do
(I can use another way) but I wish I could understand what i am doing wrong to progress.
Best.
Pascal