LiveCloud Forums
Canela SDK is missing - Printable Version

+- LiveCloud Forums (https://forums.livecloud.io)
+-- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=1)
+--- Forum: Getting Started (https://forums.livecloud.io/forumdisplay.php?fid=4)
+--- Thread: Canela SDK is missing (/showthread.php?tid=36)



Canela SDK is missing - sltfn - 06-26-2019

Hello,

I'm new to LiveCloud and not a programmer or app builder by trade. My aim is to tweak an existing app with dozens of scripts and fields and thousands of lines of code to use LiveCloud instead of its current MySQL database. In other words, I'd really rather not build a new app from the ground up. This app has performed like a champ for years; just need to move away from MySQL.

I have the current app (IDE, not a standalone) in the directory with the Canela toolkit and the initialization script added to the stack script. The existing app has a splash stack with a button that opens a substack that is functionally the main stack for the app. When I click the button on the splash stack to open the substack, I get this message. "The CanelaDB SDK is missing. Please export your Canela SDK again."

Nothing I've tried works. Suggestions? Tips?

One question occurs to me: Should the initialization script be in the main (splash) stack or the substack or both? I've tried all three options with no luck. Help!

Thanks in advance,

Sieg


RE: Canela SDK is missing - Jamil Semaan - 06-26-2019

Hi Sieg,

It sounds like there is an issue with pathing and it is unable to find the CanelaDB toolkit. Is the substack located in a different folder than the main/splash stack? The initialization script was written in mind that the stack where the script is running sits next to the CanelaDB directory.


RE: Canela SDK is missing - sltfn - 06-26-2019

(06-26-2019, 09:06 PM)Jamil Semaan Wrote: Hi Sieg,

It sounds like there is an issue with pathing and it is unable to find the CanelaDB toolkit. Is the substack located in a different folder than the main/splash stack? The initialization script was written in mind that the stack where the script is running sits next to the CanelaDB directory.

Thanks. Good question. How does one find the path to a LiveCode substack? "put the effective filename of this stack" reveals the path to the main stack.


RE: Canela SDK is missing - jasonchan - 06-26-2019

(06-26-2019, 10:01 PM)sltfn Wrote:
(06-26-2019, 09:06 PM)Jamil Semaan Wrote: Hi Sieg,

It sounds like there is an issue with pathing and it is unable to find the CanelaDB toolkit. Is the substack located in a different folder than the main/splash stack? The initialization script was written in mind that the stack where the script is running sits next to the CanelaDB directory.

Thanks. Good question. How does one find the path to a LiveCode substack? "put the effective filename of this stack" reveals the path to the main stack.

You are correct. The effective filename should do the trick.

Can you try running this and see does it match the location of your CanelaDB folder?

Code:
set the itemdel to "/"
put item 1 to -2 of the fileName of this stack



RE: Canela SDK is missing - sltfn - 06-26-2019

(06-26-2019, 10:55 PM)jasonchan Wrote:
(06-26-2019, 10:01 PM)sltfn Wrote:
(06-26-2019, 09:06 PM)Jamil Semaan Wrote: Hi Sieg,

It sounds like there is an issue with pathing and it is unable to find the CanelaDB toolkit. Is the substack located in a different folder than the main/splash stack? The initialization script was written in mind that the stack where the script is running sits next to the CanelaDB directory.

Thanks. Good question. How does one find the path to a LiveCode substack? "put the effective filename of this stack" reveals the path to the main stack.

You are correct. The effective filename should do the trick.

Can you try running this and see does it match the location of your CanelaDB folder?

Code:
set the itemdel to "/"
put item 1 to -2 of the fileName of this stack

Thanks. The results is empty. I'd guess, "This is because the filename is a property of the main stack only. Substacks do not have a filename property." This quote comes from a LiveCode lesson here.

http://lessons.livecode.com/m/4071/l/7869-how-can-i-get-the-path-to-the-folder-a-stack-file-resides-in

I have asked on a LiveCode forum where substacks are located and how that might be sleuthed out. Hopefully there is an answer, but I would appreciate any information LiveCloud users might have. Thanks.


RE: Canela SDK is missing - jasonchan - 06-27-2019

(06-26-2019, 11:34 PM)sltfn Wrote:
(06-26-2019, 10:55 PM)jasonchan Wrote:
(06-26-2019, 10:01 PM)sltfn Wrote:
(06-26-2019, 09:06 PM)Jamil Semaan Wrote: Hi Sieg,

It sounds like there is an issue with pathing and it is unable to find the CanelaDB toolkit. Is the substack located in a different folder than the main/splash stack? The initialization script was written in mind that the stack where the script is running sits next to the CanelaDB directory.

Thanks. Good question. How does one find the path to a LiveCode substack? "put the effective filename of this stack" reveals the path to the main stack.

You are correct. The effective filename should do the trick.

Can you try running this and see does it match the location of your CanelaDB folder?

Code:
set the itemdel to "/"
put item 1 to -2 of the fileName of this stack

Thanks. The results is empty. I'd guess, "This is because the filename is a property of the main stack only. Substacks do not have a filename property." This quote comes from a LiveCode lesson here.

http://lessons.livecode.com/m/4071/l/7869-how-can-i-get-the-path-to-the-folder-a-stack-file-resides-in

I have asked on a LiveCode forum where substacks are located and how that might be sleuthed out. Hopefully there is an answer, but I would appreciate any information LiveCloud users might have. Thanks.

I think the substacks are at the same location as the stacks but we are not using the correct way to get the file path. 
This is an oversight on our part. We should be using effective filename. 
If you change all the references of fileName to effective fileName in initializeCanelaDB, you should be able to use the library.
We will put it into the next update. Thank you for finding the issue.