ask command unrecognized with standalone launcher

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

ask command unrecognized with standalone launcher

Post by pascalh4 » Tue May 05, 2015 12:33 pm

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

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ask command unrecognized with standalone launcher

Post by Klaus » Tue May 05, 2015 12:47 pm

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

pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

Re: ask command unrecognized with standalone launcher

Post by pascalh4 » Tue May 05, 2015 5:32 pm

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

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ask command unrecognized with standalone launcher

Post by Klaus » Tue May 05, 2015 5:40 pm

Hi Pascal,
pascalh4 wrote:Neither of them
come on, what did you exspect then? 8)

You MUST add these stacks to your standalone
or no ASK or ANSWER dialog will ever appear! :D


Best

Klaus

pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

Re: ask command unrecognized with standalone launcher

Post by pascalh4 » Tue May 05, 2015 7:38 pm

Hi Klaus.
Well yes! I believed that it was magic. :lol:

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

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ask command unrecognized with standalone launcher

Post by Klaus » Wed May 06, 2015 12:29 pm

Hi Pascal,
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)
The example is VERY, VERY basic and only tries to show the principle behind the "splash stack" approach. 8)
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

pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

Re: ask command unrecognized with standalone launcher

Post by pascalh4 » Wed May 06, 2015 8:08 pm

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: ask command unrecognized with standalone launcher

Post by jmburnod » Wed May 06, 2015 8:46 pm

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
https://alternatic.ch

pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

Re: ask command unrecognized with standalone launcher

Post by pascalh4 » Wed May 06, 2015 9:09 pm

Thank you Jean Marc

I am going to adapt and test it tomorrow

Good evening

Pascal

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ask command unrecognized with standalone launcher

Post by Klaus » Thu May 07, 2015 12:43 pm

Hi all,

hm, the idea of making a stack a substack of a standalone in runtime seems very cumbersome to me :D

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: ask command unrecognized with standalone launcher

Post by jmburnod » Thu May 07, 2015 5:14 pm

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
https://alternatic.ch

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ask command unrecognized with standalone launcher

Post by Klaus » Thu May 07, 2015 5:21 pm

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 :D

The "ususal" way to make a stack's handler etc. available to other stacks is to "start using thatstack".


Best

Klaus

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: ask command unrecognized with standalone launcher

Post by jmburnod » Thu May 07, 2015 6:09 pm

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 :D
Thanks again
Jean-Marc
https://alternatic.ch

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: ask command unrecognized with standalone launcher

Post by SparkOut » Sat May 09, 2015 6:32 am

That is a great tip Klausimausi, I never realised that "start using" the launcher would pass availability of all the externals, dialogs etc too.

pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

Re: ask command unrecognized with standalone launcher

Post by pascalh4 » Sat May 09, 2015 10:22 pm

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

Post Reply