standalone not same as editor

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

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

standalone not same as editor

Post by pascalh4 » Mon Sep 16, 2013 11:49 am

Hi

Following my tests on stack, another issue concerns me.

when I start the command of a stack, which created another, I no problems in the editor LiveCode. (Use of the first stack displays the second stack)

But when I make an executable, the second stack is not displayed.

Is there a particular décalration to do this?

Pascal

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

Re: standalone not same as editor

Post by Klaus » Mon Sep 16, 2013 12:09 pm

Which commands do not work in a standalone?

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

Re: standalone not same as editor

Post by pascalh4 » Mon Sep 16, 2013 1:10 pm

hi Klaus

here is the code that does not work.
In the editor a new F0 stack is displayed and not the standalone.

Code: Select all

on mouseUp
   put 00 into tNum 
   ask "donner un titre" 
   if it=empty then exit to top 
   put it into Nvar
   
   set the name of stack "F0base" of stack "Outils de création" to ( "F" & tNum  & "  " &  Nvar) 
   hide stack ( "F" & tNum  & "  " &  Nvar) 
   set the loc of stack  ( "F" & tNum  & "  " &  Nvar)  to 450,300
   
   
   clone stack( "F" & tNum  & "  " &  Nvar) of stack"Outils de création" 
   put 0 into tNum 
   set the name of stack ( "copy of F00"  & "  " &  Nvar) to ( "F" & tNum  & "  " &  Nvar) 
   set the loc of stack ( "F" & tNum  & "  " &  Nvar) to 650,350  
   
   hide button "Nouveau Tutoriel" 
   go to stack"Outils de création"
end mouseUp
I've made ​​a mistake?

Pascal

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

Re: standalone not same as editor

Post by Klaus » Mon Sep 16, 2013 2:26 pm

Hi Pascal,

the script is OK, and when it does work in the IDE it also should work in the standalone!
Since I have no idea what is going on, you could add a ANSWER here and ther, so you can
at least see WHAT command is NOT being executed in your standalone:

Code: Select all

on mouseUp
   put 00 into tNum 
   ask "donner un titre" 
   if it=empty then exit to top 
   put it into Nvar
   answer "user title:" && Nvar
   
   set the name of stack "F0base" of stack "Outils de création" to ( "F" & tNum  & "  " &  Nvar) 
   answer "Set stack name OK"

   hide stack ( "F" & tNum  & "  " &  Nvar) 
   set the loc of stack  ( "F" & tNum  & "  " &  Nvar)  to 450,300
   answer "Set stack visible and LOC OK"
   
   clone stack( "F" & tNum  & "  " &  Nvar) of stack"Outils de création" 
   answer "clone stack OK"

   put 0 into tNum 
   set the name of stack ( "copy of F00"  & "  " &  Nvar) to ( "F" & tNum  & "  " &  Nvar) 
   answer "Set stack name of clone OK"

   set the loc of stack ( "F" & tNum  & "  " &  Nvar) to 650,350  
   
   hide button "Nouveau Tutoriel" 
   go to stack"Outils de création"
end mouseUp
Know what I mean? This way you will see which dialog does NOT appear and might get a hint...


Best

Klaus

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

Re: standalone not same as editor

Post by pascalh4 » Mon Sep 16, 2013 3:08 pm

Hi Klaus

Ok, I'll make "ANSWER" test
AndI come back if I find the reason.

Pascal

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

Re: standalone not same as editor

Post by pascalh4 » Mon Sep 16, 2013 4:36 pm

Hi Klaus

I found, but it seems illogical.
In the second part of code, I use "hide"
everything works with this code in the editor but not in standalone.

Code: Select all

   hide button "Nouvelle Fiche"
   show button "Sauver la fiche"
   
   hide stack ( "F" & tNum  & "  " &  Nvar)
   clone stack ( "F" & tNum  & "  " &  Nvar)
   
   set the mainstack of it to  the mainstack of stack "Outils de création"
   add 1 to tNum
   set the name of it to ( "F" & tNum  & "  " &  Nvar)
   set the loc of stack ( "F" & tNum  & "  " &  Nvar) to (650,350)
   go to "Outils de création"



but with adding " show stack ( "F" & tNum & " " & Nvar)" then the standalone works

Code: Select all

   hide button "Nouvelle Fiche"
   show button "Sauver la fiche"
   
   hide stack ( "F" & tNum  & "  " &  Nvar)
   clone stack ( "F" & tNum  & "  " &  Nvar)
   
   set the mainstack of it to  the mainstack of stack "Outils de création"
   add 1 to tNum
   set the name of it to ( "F" & tNum  & "  " &  Nvar)
   show stack ( "F" & tNum  & "  " &  Nvar)
   set the loc of stack ( "F" & tNum  & "  " &  Nvar) to (650,350)
   go to "Outils de création"
Is there a reason for this (why the "show" command is not necessary in the editor)?

Pascal

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

Re: standalone not same as editor

Post by Klaus » Tue Sep 17, 2013 10:46 am

Hi Pascal,

sorry, no idea.

But again, do not put parens around the numbers for a LOC or RECT:
...
## BAD: set the loc of XYZ to (650,350)
Good: set the loc of XYZ to 650,350
...


Best

Klaus

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

Re: standalone not same as editor

Post by pascalh4 » Tue Sep 17, 2013 7:45 pm

Hi Klaus,
sorry, no idea.
It doesn't matter, since a solution is found.
## BAD: set the loc of XYZ to (650,350)
Good: set the loc of XYZ to 650,350
For the parentheses, it was just forgetting of my previous error.

Thank's for all

Pascal

Post Reply