external stack not working correctly in standalone

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Greg O.
Posts: 21
Joined: Wed Jun 18, 2014 4:02 am
Location: Peyton, Colorado

external stack not working correctly in standalone

Post by Greg O. » Thu Nov 22, 2018 8:17 pm

I am using the example database library stack from https://www.youtube.com/watch?v=wXtKIyz0eRA&t=2708s to access a SQLite Database, and it works perfectly in the IDE, but when saved as a standalone I receive the attached error when attempting to connect to the database file.
Capture.JPG


This library stack is accessed using the Start using stack handler called from preOpenStack in the main stack. I am using 9.0.1. I do have the library (LibDB.livecodescript) stack in the standalone folder.

Code: Select all

on preOpenStack
   
      set the itemDelimiter to "/"
      Put the effective fileName of this stack into ltPath
      Delete item -1 of ltPath
      Put ltPath & "/LibDB.livecodescript" into  ltPath
      start using stack ltPath
   
end preOpenStack
Any suggestions are welcome.

Thank you

Klaus
Posts: 13820
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: external stack not working correctly in standalone

Post by Klaus » Thu Nov 22, 2018 8:59 pm

Hi Grewg,

did you add your library stack to your standalone via the "Copy files" tab in the "standalone builder settings? If yes, the you will find it in:

Code: Select all

on preOpenStack
   ## set the itemDelimiter to "/"
   ## Put the effective fileName of this stack into ltPath
   ## Delete item -1 of ltPath
   ## Put ltPath & "/LibDB.livecodescript" into  ltPath
   Put specialfolderpath("resources") & "/LibDB.livecodescript" into ltPath
   start using stack ltPath   
end preOpenStack
If not, please provide a bit more info.


Best

Klaus

Greg O.
Posts: 21
Joined: Wed Jun 18, 2014 4:02 am
Location: Peyton, Colorado

Re: external stack not working correctly in standalone (solved)

Post by Greg O. » Thu Nov 22, 2018 9:10 pm

thank you for the suggestion. That saves some space to be sure.

I solved the issue by manually setting the inclusions in the standalone settings. The database drivers, and .dll files were not being included in the automatic settings. This of course means i have to remember all the things I used that require inclusions...

Post Reply

Return to “Talking LiveCode”