New Card in Standalone Application

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

Xacto
Posts: 26
Joined: Thu Dec 15, 2016 1:34 am

New Card in Standalone Application

Post by Xacto » Sat Feb 04, 2017 6:35 am

I have a stack with grouped buttons that have the following codes:

Code: Select all

new card
and

Code: Select all

delete this card
.

When I save it as a standalone it will no longer save the newly created cards when I close the application.

Is there a way to make this work like it does in the livecode editor?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: New Card in Standalone Application

Post by jmburnod » Sat Feb 04, 2017 1:02 pm

Hi Xacto,
A standalone remains as it compiled.
I know two ways to do what you want
1. Export what is changed to external files and import them at preopenstack
2. Use stacks which can be modify. Your standalone can be invisible and the user works with a stack opened by standalone.
Best regards
Jean-Marc
https://alternatic.ch

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: New Card in Standalone Application

Post by dunbarx » Sun Feb 05, 2017 5:43 am

Hi.

What jean-Marc said.

What he means is that all standalone are prohibited from being modified by any OS. My suggestion is his #2. You create a "splash" stack, which is its own stack file, the actual executable, and need not have any functionality at all. It merely is a vehicle for any number of additional stack files, completely independent, which are added to the executable stack file in the standalone settings. These others can all be changed and saved.

There are numerous threads on this subject going back years. Search for "splash". But most important, make a simple example that you might craft in just a few minutes, and experiment. Then when you have the concept down, apply it to your project.

Craig Newman
Last edited by dunbarx on Mon Feb 06, 2017 5:08 am, edited 1 time in total.

Xacto
Posts: 26
Joined: Thu Dec 15, 2016 1:34 am

Re: New Card in Standalone Application

Post by Xacto » Mon Feb 06, 2017 2:38 am

Thank you all... I will have to experiment with creating a splash.

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: New Card in Standalone Application

Post by AndyP » Mon Feb 06, 2017 9:05 am

Have a look here...similar question,

http://forums.livecode.com/viewtopic.php?f=8&t=28788
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

Xacto
Posts: 26
Joined: Thu Dec 15, 2016 1:34 am

Re: New Card in Standalone Application

Post by Xacto » Tue Feb 07, 2017 2:35 am

Have a look here...similar question,
http://forums.livecode.com/viewtopic.php?f=8&t=28788
So, I created a "splash" stack like explained in the forum. However, when i create the standalone it does not seem to find the program it needs to launch. I placed application and all the other files in the same folder.

I have included the simple test example.

Any idea why it does not work?

Thanks,
Brian
Attachments
SplashTest.zip
(5.14 KiB) Downloaded 194 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: New Card in Standalone Application

Post by dunbarx » Tue Feb 07, 2017 3:52 am

Is it that you cannot save the "working" stack or that you cannot launch the executable at all? Should not be an issue with the second.

Craig

Xacto
Posts: 26
Joined: Thu Dec 15, 2016 1:34 am

Re: New Card in Standalone Application

Post by Xacto » Tue Feb 07, 2017 4:02 am

The program does not launch.

I think I may have figured it out. Please correct me if I am wrong.

I need to do the following:
Go to this location: File > Standalone Application Settings > Stacks.
Check "Move substacks into individual stackfiles".
Select "Add Stack File..." button and chose the stack you want to launch.

Once I do this, it seems to work after I compile it. It also seems to work without including the .livecode files in the same folder.

Is this the correct way?

Thanks!

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: New Card in Standalone Application

Post by AndyP » Tue Feb 07, 2017 8:28 am

I just tried your zip example and all works as expected.

A bit of clarification on how to construct this.

The Launcher.livecode and HyperTest.livecode stacks should be created independently from each other.
The HyperTest.livecode is not a substack of Launcher.livecode it is its own top level stack.

None of this is required.
Go to this location: File > Standalone Application Settings > Stacks.
Check "Move substacks into individual stackfiles".
Select "Add Stack File..." button and chose the stack you want to launch.
Also the HyperTest.livecode should not be compiled.. it remains a livecode stack not an exe
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: New Card in Standalone Application

Post by dunbarx » Tue Feb 07, 2017 3:36 pm

Also the HyperTest.livecode should not be compiled.. it remains a livecode stack not an exe
I assume this means "..should not be made into a standalone".

All stacks need to be compiled and saved.

Craig

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: New Card in Standalone Application

Post by AndyP » Tue Feb 07, 2017 5:36 pm

Hi Graig,

yep...correct...one day ill get away from Delphi terminology :oops:
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

Xacto
Posts: 26
Joined: Thu Dec 15, 2016 1:34 am

Re: New Card in Standalone Application

Post by Xacto » Thu Feb 09, 2017 4:23 am

None of this is required.

Go to this location: File > Standalone Application Settings > Stacks.
Check "Move substacks into individual stackfiles".
Select "Add Stack File..." button and chose the stack you want to launch.
Sorry for all these questions - I appreciate all the help. Just trying to get my head around this. :)

So, If i do not do all the things I described above (which you say is not required) - it fails to launch on my end. I created a standalone for just the launcher and when run it and I hit the button, it just sits there. It is odd that you can run my original uploaded stack with no problem. I am running on a MAC, are you on a PC? Would this make a difference?

Another thing... I am providing a link to the standalone application that I using the "Add Stack File..." (added HypeTest.livecode) when I compiled the launcher. If you run it, you will see it works even without the HyperTest.livecode file in the same folder. It no longer needs two files; launcher and HypeTest.livecode. Just the Launcher.

Is this correct or am I missing something?

https://www.dropbox.com/s/7jy6l8umtpzpe ... r.zip?dl=0

Thanks!

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: New Card in Standalone Application

Post by jmburnod » Thu Feb 09, 2017 6:47 pm

Hi xacto,
I played a bit with your launcher stack.
you will see it works even without the "HyperTest.livecode" file in the same folder
Yes. If i understand you correctly, you added a stack "HyperTest.livecode" to the list of stacks in standalone setting.
You said "it works". I think you can't save what has been changed in "HyperTest.livecode" stack because
a standalone can't be modify


Fortunately, LiveCode is very flexible and you can open a stack and modify it if it is outside of standalone.
Unfortunately, the path of a stack is different if this stack is inside or outside of standalone (standalone is a package).

Here is your first stack with some changes
1. Stack script
getMyStackFolderPath() is a function that return the path of the folder where is your stack or standalone.
2. Btn "Launch" script
Changed for using getMyStackFolderPath

I didn't test save command, but i was surprised to see an answer dialog for change without changes.

Best regards
Jean-Marc
Attachments
SplashTest001.zip
(5.8 KiB) Downloaded 207 times
https://alternatic.ch

Xacto
Posts: 26
Joined: Thu Dec 15, 2016 1:34 am

Re: New Card in Standalone Application

Post by Xacto » Fri Feb 10, 2017 3:36 am

Hmmm... That is what I thought, however.... I CAN save in my Launcher standalone without the .livecode file in the same folder? I can create new card and it will save it when I close and reopen it.

If I run your files that you just uploaded... After I create the standalone, it will only work if the HyperTest.llivecode is in the same folder. If you run the one ONE standalone file that I created, it works without any .livecode file in the folder.

I also compressed my folder with the Hypertest.livecode to make sure it is not linking to it.

Here is a video showing that it is working as a standalone, note there are no other files in the folder:
https://www.dropbox.com/s/m17vj69c3inu3 ... g.mov?dl=0

I am lost on why this is working for me. :)

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: New Card in Standalone Application

Post by jmburnod » Fri Feb 10, 2017 5:46 pm

Hi Xacto,
I can create new card and it will save it when I close and reopen it.
Yes, i tested it and I was surprised that it works :shock:
https://alternatic.ch

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”