Perhaps my question belongs in the Databases forum but I'll try here first.
I'm working on a project to convert an existing app from a tool for managing data in a MySQL database to a tool for managing data in the new LiveCloud database product. I've asked LiveCloud support for help on the following problem and also posted my question in a LiveCloud forum, but no resolution so far.
My existing app, which I'm running in the IDE on Mac OSX (not as a standalone), has a splash stack with a button that opens a substack that is functionally the main stack for the app. LiveCloud's required CanelaDB toolkit is in the same directory as the main stack and LiveCloud's initialization code is in the stack script of the substack where all the app's functionality resides.
When I click the button on my splash stack to open the substack, I get this message. "The CanelaDB SDK is missing. Please export your Canela SDK again."
LiveCloud's initial response was that it "sounds like a pathing issue," and that my substack needs to be in the same directory as the CanelaDB toolkit. Fair enough, but how do I determine the filepath for my substack? "Put effective filename of this stack" just gives the path to my mainstack. "Put filename of this stack" doesn't yield any information.
As far as LiveCode is concerned where does my substack reside?
Thanks in advance,
Sieg
substack location (filepath)
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 29
- Joined: Mon Apr 09, 2012 8:53 pm
-
- Livecode Opensource Backer
- Posts: 366
- Joined: Tue Apr 10, 2012 9:18 am
Re: substack location (filepath)
try this:
Code: Select all
--set the defaultFolder to stack location
set the itemDelimiter to "/"
get the effective fileName of this stack
#you could put that into a global to pass to your other stack
put item 1 to -2 of it into gDefaultFolder
#or use it to set your defaultFolder like so
set the defaultFolder to gDefaultFolder
Re: substack location (filepath)
*Edit - I posted before comprehending the actual question, my bad.
It resides in the 'default folder' when your in the IDE, as ghettocottage's code shows, you can change this location.As far as LiveCode is concerned where does my substack reside?

-
- VIP Livecode Opensource Backer
- Posts: 29
- Joined: Mon Apr 09, 2012 8:53 pm
Re: substack location (filepath)
Thanks. Very helpful. Now LiveCloud support is telling me they believe the essential problem is their use of filename when they should have used effective filename in their initialization script for the database toolkit. Will be fixed in the next release, and obviously an easy fix to make for oneself.