ask command unrecognized with standalone launcher
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
ask command unrecognized with standalone launcher
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
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
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
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
Hi Klaus.
Neither of them
I just created an .exe standalone launcher:
And this launchs a button command with this code (At least, it is the beginning) :
But the windows to write text don't appear.
Pascal
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
Code: Select all
on mouseUp
ask "donner un titre"
end mouseUp
Pascal
Re: ask command unrecognized with standalone launcher
Hi Pascal,
You MUST add these stacks to your standalone
or no ASK or ANSWER dialog will ever appear!
Best
Klaus
come on, what did you exspect then?pascalh4 wrote:Neither of them

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
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
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
Hi Pascal,

Best
Klaus
The example is VERY, VERY basic and only tries to show the principle behind the "splash stack" approach.pascalh4 wrote: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)

Sorry, don't understand this question?!pascalh4 wrote:Now if I understood, some functions must be launched in the standalone. How to know which?
Best
Klaus
Re: ask command unrecognized with standalone launcher
Hello Klaus
Best
Pascal
Exactly it's good for me. I am a basic, very basic beginner.The example is VERY, VERY basic and only tries to show the principle behind the "splash stack" approach.
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.Sorry, don't understand this question?!
Best
Pascal
Re: ask command unrecognized with standalone launcher
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
Best regards
Jean-Marc
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
Jean-Marc
https://alternatic.ch
Re: ask command unrecognized with standalone launcher
Thank you Jean Marc
I am going to adapt and test it tomorrow
Good evening
Pascal
I am going to adapt and test it tomorrow
Good evening
Pascal
Re: ask command unrecognized with standalone launcher
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:
Best
Klaus
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
Klaus
Re: ask command unrecognized with standalone launcher
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.
How can I see how this way is cumbersome ?
Best
Jean-Marc
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.
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.hm, the idea of making a stack a substack of a standalone in runtime seems very cumbersome to me
How can I see how this way is cumbersome ?
Best
Jean-Marc
https://alternatic.ch
Re: ask command unrecognized with standalone launcher
Hi Jean-Marc,
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
No, I just added my line to the standalone stack's (launcher) script, see above, 3rd posting!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.
I said that looks cumbersome to ME!jmburnod wrote: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.hm, the idea of making a stack a substack of a standalone in runtime seems very cumbersome to me
How can I see how this way is cumbersome ?
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
Hi Klaus,
Thanks again
Jean-Marc
I never thought that a stack can set starting use itselfNo, I just added my line to the standalone stack's (launcher) script, see above, 3rd posting!

Thanks again
Jean-Marc
https://alternatic.ch
Re: ask command unrecognized with standalone launcher
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
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
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