still trouble with standalone

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
mister
Posts: 39
Joined: Thu Nov 27, 2014 9:03 pm

still trouble with standalone

Post by mister » Sat May 21, 2016 9:39 pm

i've tried to save data as an IOS standalone following these lessons verbatim and with different lines of code. The problem is that only the splash screen shows. i don't see the other stack in contents package or when i launch the stack. i am including it in the stack files of the stand alone.

For my splash screen, i use a stack with a colored rectangle on the card. I've tried the following many many times. The first throws an error before you even save as a standalone.

i've tried this with lc 8.0.0 and 8,0.0 rc1.

Code: Select all

on preOpenStack
   if the environment is "mobile" then
      set the loc of this stack to the screenLoc
      put the document folder into thedocPath
      --put the engine folder into the docPath
      --put  specialFolderPath("engine") into theDocPath
      put "/number.livecode" after theDocPath
   end if
  
   if there is not a file theDocPath then
      put the effective fileName of this stack into theMoveFromPath
      set the itemDel to slash
      put "number.livecode" into the last item of theMoveFromPath
      rename file theMoveFromPath to theDocPath
   end if
    --answer theDocPath
   go invisible stack theDocPath
   end preOpenStack
   
  on OpenStack
   wait 3 seconds
   show stack "number"
   close stack "sp"
end OpenStack
i never got this to work either, using i believe 7.1.2 and 7.1.3

Code: Select all

on openStack
    open stack "Main Application.livecode"
    close stack "Launcher"
end openStack

on mouseUp
   set the cName of this stack to fld "name"
   put empty into fld "name"
end mouseUp

on closeStack
    save this stack
    pass closeStack
end closeStack
What simple thing am i missing again, thanks

Larry

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: still trouble with standalone

Post by Simon » Sat May 21, 2016 10:16 pm

Hi Larry,
put the document folder into thedocPath
should be

Code: Select all

put specialFolderPath("resources") into thedocPath
That will solve the first error.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7258
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: still trouble with standalone

Post by jacque » Sun May 22, 2016 8:19 pm

Actually, I think the docPath is okay but this is the part that errors:

Code: Select all

put the effective fileName of this stack into theMoveFromPath
set the itemDel to slash
put "number.livecode" into the last item of theMoveFromPath
The source path for the file that needs to be copied is in the "resources" folder, so this should work:

Code: Select all

put specialFolderPath("resources") & "number.livecode" into  theMoveFromPath
That should find the original file. One reason you may be getting an error in the IDE is because you've only defined theDocPath inside the check for mobile. In the IDE, the docPath will not have a value. Move theDocPath assignment outside the mobile environment "if" block.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Klaus
Posts: 13866
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: still trouble with standalone

Post by Klaus » Sun May 22, 2016 9:05 pm

Hi mister,

what Jaques and Simon say! :D

BUT: Do not use RENAME, we are not allowed to modify, and renaming IS some kind of modifying, in the engine folder!
Delete that line and COPY the stack fiel to the documents folder like this:

Code: Select all

...
put specialFolderPath("documents") & "/number.livecode" into theDocPath
put specialFolderPath("resources") & "/number.livecode" into theMoveFromPath

## Now copy the file:
put url("binfile:" & theMoveFromPath) into url("binfile:" & theDocPath)
...
Best

Klaus

mister
Posts: 39
Joined: Thu Nov 27, 2014 9:03 pm

Re: still trouble with standalone

Post by mister » Mon May 23, 2016 9:04 pm

Thanks all of you. That worked for the IDE but does not work on my phone. It's not copying the file into the bundle. i don't if it's the script or what. i've tried a lot of different variations with the script. One thing i notice though when I add the stack file, it shows just one in the bottom right box and then after i set do the IOS setting there is still only one in the stacks file but has been switched to the splash screen. The pictures are in reverse order.
Screen Shot 2016-05-23 at 2.19.12 PM.png

I'm using OS X 10.11; IOS 9.3; lc 8.0 rc-1;


Thanks again, Larry
Attachments
Screen Shot 2016-05-23 at 2.17.16 PM.png

mister
Posts: 39
Joined: Thu Nov 27, 2014 9:03 pm

Re: still trouble with standalone

Post by mister » Tue May 24, 2016 2:21 pm

What a moroon. it's copy files, not add stacks with IOS. :oops:

Thanks again,

larry

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”