I've read the lessons and tried the following without success.
I want to save the entries in various fields and it works a treat when I launch a splash stack (call it the primary stack) that, in turn, launches the stack with the for-saving fields (call it the secondary stack). All good, no problem. The problem arises though with an image in the 'secondary' stack. In the IDE, the path to the image is shown in the secondary stack, but the 'save-as-standalone' dialog is only relevant to the 'splash' stack and no variation is working to 'embed', or otherwise reference, the referenced image file in the 'secondary' stack. In the standalone build, the image does not appear.
Load your 38s, spin the cylinder, pull the trigger and put me out of my misery.
Images in standalones
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Images in standalones
If we're treading on thin ice, well you might as well dance.
Re: Images in standalones
Hi dalkin,
I'm german, no guns over here!
Let me see if I get it right.
1. You have a stack "stack1" that is turned into a standalone -> the famous SPLASH stack
2. You have another separate stack that gets saved -> "stack2"
3. 1. opens 2.
4. There is an image in "stack2" that is not displayed in the runtime.
Did you add that image to stack2?
If yes, why not just IMPORT AS CONTROL that image?
If not, how does the image get into that stack2?
If you want to reference images use RELATIVE pathnames = relative to the (runtime) stack.
Do like this:
1. In the IDE put the image(s) into the folder with the stack1, either as separate files of in a folder
2. Enter the filename in the inspector for that image RELATIVE, means simply the filename without
any folder reference -> my_image.jpg
3. Add your image or folder of images to your later runtime via "Copy files" in the "Standalone Application settings"
4. This way LC will map that folder to your runtime app structure as if it was in the IDE:
stack1
my_image.jpg
5. You can also access that folder via script with- -> specialfolderpath("resources")
This folder will also work in the IDE where it point to the folder the current stack resides in.
So if 2. does not work for you, you can later script:
Hope I got it right!
Best
Klaus
I'm german, no guns over here!
Let me see if I get it right.
1. You have a stack "stack1" that is turned into a standalone -> the famous SPLASH stack
2. You have another separate stack that gets saved -> "stack2"
3. 1. opens 2.
4. There is an image in "stack2" that is not displayed in the runtime.
Did you add that image to stack2?
If yes, why not just IMPORT AS CONTROL that image?
If not, how does the image get into that stack2?
If you want to reference images use RELATIVE pathnames = relative to the (runtime) stack.
Do like this:
1. In the IDE put the image(s) into the folder with the stack1, either as separate files of in a folder
2. Enter the filename in the inspector for that image RELATIVE, means simply the filename without
any folder reference -> my_image.jpg
3. Add your image or folder of images to your later runtime via "Copy files" in the "Standalone Application settings"
4. This way LC will map that folder to your runtime app structure as if it was in the IDE:
stack1
my_image.jpg
5. You can also access that folder via script with- -> specialfolderpath("resources")
This folder will also work in the IDE where it point to the folder the current stack resides in.
So if 2. does not work for you, you can later script:
Code: Select all
...
set the filename of image "your formerly missing image" of cd 1 of stack "stack2" to (specialfolderpath("resources") & "/my_image.jpg")
...
Best
Klaus
Re: Images in standalones
What Klaus says! (as always )
either import as control and reference it by it's ID, or copy as external file in the standalone build settings and reference it via specialFolderPath("resources")/<image file name>
either import as control and reference it by it's ID, or copy as external file in the standalone build settings and reference it via specialFolderPath("resources")/<image file name>