Standalone Application for Mac V10.5.8
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Standalone Application for Mac V10.5.8
Hello Bernd,
The reference you suggested is the one I referenced at the beginning of this thread. I had tried to use the 'splash' method she suggested. Are you suggesting that I would be better off trying one of her other suggestions and if so which one?
Larry
The reference you suggested is the one I referenced at the beginning of this thread. I had tried to use the 'splash' method she suggested. Are you suggesting that I would be better off trying one of her other suggestions and if so which one?
Larry
Re: Standalone Application for Mac V10.5.8
Hi Larry,
sorry I did forget to read the whole thread since I follow this on an RSS feed that happens.
With datagrids and standalones there seems to be a trick with the splash screen approach, you have to trick Rev into loading the datagrid libraries. See:
http://lessons.runrev.com/spaces/lesson ... Data-Grid-
If you use this in a standalone splash stack and add your project as included stacks which are opened by the splash screen stack it could work. Not tested but looks like it could be your problem.
So you could use just a small stack that has nothing to do with your main project, make this stack the Application (the compiled stack) and your project stack are the included stacks that are started by the Application stack.
this threads deals with splash screen and has an image showing where your included stack are on a Mac.
http://forums.runrev.com/phpBB2/viewtop ... it=+splash
I hope this is of some help, maybe someone with more experience building standalones with datagrids could jump in.
regards
Bernd
sorry I did forget to read the whole thread since I follow this on an RSS feed that happens.
With datagrids and standalones there seems to be a trick with the splash screen approach, you have to trick Rev into loading the datagrid libraries. See:
http://lessons.runrev.com/spaces/lesson ... Data-Grid-
If you use this in a standalone splash stack and add your project as included stacks which are opened by the splash screen stack it could work. Not tested but looks like it could be your problem.
So you could use just a small stack that has nothing to do with your main project, make this stack the Application (the compiled stack) and your project stack are the included stacks that are started by the Application stack.
this threads deals with splash screen and has an image showing where your included stack are on a Mac.
http://forums.runrev.com/phpBB2/viewtop ... it=+splash
I hope this is of some help, maybe someone with more experience building standalones with datagrids could jump in.
regards
Bernd
Re: Standalone Application for Mac V10.5.8
Bernd et. al.,
At Last! I think I have finally gotten a working combination. I think the secret in my case was to forget about the revJournal article and use only Trevor's standalone methods. I also think I remember Mark kept telling me not to use separate stacks. I think that my use of DataGrids in the application required that I not check the box 'Move substacks into individual stackfiles', I think by doing that, as the revJournal stated, I hindered the compilation of the DataGrid libraries. I am now NOT checking that box for either my splash stack or my working application stack.
My configuration is like this in general:
My splash stack as a main stack with very minimal stuff in it. It amounts to an 'About' label and a button to continue. The substack to that is the one called 'Data Grid Templates Dud' per Trevor's documentation. Then I have another main stack which has about 10 substacks. One of those substacks is called 'Data Grid Templates' followed by a space and a very long number. That substack contains all the particulars for the four or five different data grids I use in the application.
The final Mac application has a package which has a folder called MacOS (among others) which contains something called "Portfolio Manager" and something called pmContents.rev.
The Windows package contains Portfolio Manager.exe, pmContents.rev and a folder called Externals.
I still have more development to do but I think I am on the right track.
I apologize for my expression of frustration earlier and I'm sure glad you guys will still talk to me.
Regards,
Larry
At Last! I think I have finally gotten a working combination. I think the secret in my case was to forget about the revJournal article and use only Trevor's standalone methods. I also think I remember Mark kept telling me not to use separate stacks. I think that my use of DataGrids in the application required that I not check the box 'Move substacks into individual stackfiles', I think by doing that, as the revJournal stated, I hindered the compilation of the DataGrid libraries. I am now NOT checking that box for either my splash stack or my working application stack.
My configuration is like this in general:
My splash stack as a main stack with very minimal stuff in it. It amounts to an 'About' label and a button to continue. The substack to that is the one called 'Data Grid Templates Dud' per Trevor's documentation. Then I have another main stack which has about 10 substacks. One of those substacks is called 'Data Grid Templates' followed by a space and a very long number. That substack contains all the particulars for the four or five different data grids I use in the application.
The final Mac application has a package which has a folder called MacOS (among others) which contains something called "Portfolio Manager" and something called pmContents.rev.
The Windows package contains Portfolio Manager.exe, pmContents.rev and a folder called Externals.
I still have more development to do but I think I am on the right track.
I apologize for my expression of frustration earlier and I'm sure glad you guys will still talk to me.
Regards,
Larry
Re: Standalone Application for Mac V10.5.8
Larry,
Following through this thread re building a standalone, you might try building with only the splash screen stack. If you leave out the main stack and substacks, the build goes much faster. However,a copy of the main stack will then need to be moved in to the package (mac) or kept close by the .exe for windows so that it will respond to the message from the splash screen to open. You mention 'Portfolio manager.exe' which sounds like it's more than the splash screen. If it is part of the active stack, you won't be able to save activity in it.
Dave
Following through this thread re building a standalone, you might try building with only the splash screen stack. If you leave out the main stack and substacks, the build goes much faster. However,a copy of the main stack will then need to be moved in to the package (mac) or kept close by the .exe for windows so that it will respond to the message from the splash screen to open. You mention 'Portfolio manager.exe' which sounds like it's more than the splash screen. If it is part of the active stack, you won't be able to save activity in it.
Dave
Re: Standalone Application for Mac V10.5.8
dsquance,
The way I have it set up now is that 'Portfolio Manager' is really just the splash screen and PM Contents is the mian part where things need to be saved. I think it will work as is.
Larry
That is an interesting approach. Do you know how I would move the main stack into the Mac package?you might try building with only the splash screen stack. If you leave out the main stack and substacks, the build goes much faster. However,a copy of the main stack will then need to be moved in to the package (mac) or kept close by the .exe for windows so that it will respond to the message from the splash screen to open
The way I have it set up now is that 'Portfolio Manager' is really just the splash screen and PM Contents is the mian part where things need to be saved. I think it will work as is.
Larry
Re: Standalone Application for Mac V10.5.8
Hi Larry,
I asked you why you saved substacks as separate files. That is not exactly the same as recommending to not use separate files. If you are using separate files already, while working on your project, your standalone will probably work fine with separate files. If you are using substacks, you probably don't want to save them as separate files.
You now have two options. The first option is to use the splash window approach and tell the standalone builder to save substacks as separate files. If you choose this, you need to make sure that all stack files are loaded by the splash window. I would expect that the standalone builder took care of this, but apparently it doesn't always do so. You need syntax similar to
This will load the stack "Name of Stack File.rev" into memory. From then on, you can refer to it by it's short name, for example "Name of Stack File" (without extension).
Your second option is to save the data of the datagrid to a file. Simply write the data to a file when you close the application and read the data from that file when you start the application. Make sure to keep this file in a writable location, e.g. the documents folder.
Oops, there might be a third option. The third option is to not use separate stack files, except for one stack file, which includes the main stack and all substacks. I think this is what Dave means. If your stack is called "Portfolio Manager.rev" then your splash window needs to include the following script:
This script would load your single separate stack file with all it's substacks into memory. After you build the splash standalone, you copy your substack into the same folder as the executable. On Windows, this is just the .exe file. On the Mac, you need to open the application package and search for the folder "/Contents/MacOS", which contains a Unix executable with the name of your standalone. Put your substack into this folder.
One remaining problem is that the standalone often resides in a locked applications folder. This means that you still can't save changes in your substack. Therefore you need to copy this substack to a writable location, such as the documents folder, when your application starts for the first time. If you do this, the script in the splash stack would look as follows (on Mac OS X):
I hope this helps.
Best,
Mark
I asked you why you saved substacks as separate files. That is not exactly the same as recommending to not use separate files. If you are using separate files already, while working on your project, your standalone will probably work fine with separate files. If you are using substacks, you probably don't want to save them as separate files.
You now have two options. The first option is to use the splash window approach and tell the standalone builder to save substacks as separate files. If you choose this, you need to make sure that all stack files are loaded by the splash window. I would expect that the standalone builder took care of this, but apparently it doesn't always do so. You need syntax similar to
Code: Select all
// load separate stack files
set the itemDel to slash
put item 1 to -2 of the effective filename of this stack into myPath
go inv stack (myPath & "/Name of Stack File.rev"
Your second option is to save the data of the datagrid to a file. Simply write the data to a file when you close the application and read the data from that file when you start the application. Make sure to keep this file in a writable location, e.g. the documents folder.
Oops, there might be a third option. The third option is to not use separate stack files, except for one stack file, which includes the main stack and all substacks. I think this is what Dave means. If your stack is called "Portfolio Manager.rev" then your splash window needs to include the following script:
Code: Select all
on preOpenStack
hide me
put the effective filename of me into myPath
set the itemDel to slash
put item 1 to -2 of myPath into myPath
go stack (myPath & "/Portfolio Manager.rev") in new window
-- remainder of script here
end preOpenStack
One remaining problem is that the standalone often resides in a locked applications folder. This means that you still can't save changes in your substack. Therefore you need to copy this substack to a writable location, such as the documents folder, when your application starts for the first time. If you do this, the script in the splash stack would look as follows (on Mac OS X):
Code: Select all
on preOpenStack
hide me
put the effective filename of me into myPath
set the itemDel to slash
put item 1 to -2 of myPath into myPath
if not (there is a file "~/documents/Portfolio Manager.rev") then
revCopyFile (myPath & "/Portfolio Manager.rev"),"~/documents/Portfolio Manager.rev"
end if
go stack "~/documents/Portfolio Manager.rev" in new window
-- remainder of script here
end preOpenStack
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Standalone Application for Mac V10.5.8
Making a standalone that save stuff within itself is unusual, and not very easy as you found out. Using substacks and then moving them around to other stackfiles is not anticipated by the datagrid. If you'd start with the substacks being their own mainstacks, you would not run into this problem. The datagrid depends on a substack that it creates when you place it n a card. If you insist on your current workflow, add code that moves the datagrid created substack to the relevant mainstacks when you start the program outside of the ide.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode