12-07-2021, 12:03 PM
(This post was last modified: 12-07-2021, 12:15 PM by clarencemartin.)
(12-07-2021, 08:03 AM)stamatis Wrote: Hi all,
not sure if this is something to do with internal housekeeping with LiveCloud...
I've added a small custom library to the /CanelaDB/libraries/ folder to manage the initialising code no matter the location of this directory, which works well for my purposes.
Only, on occasion the stack file simply disappears!? (ie the above directory will suddenly only contain the 2 canelaDB libraries).
Not offloaded to cloud - just gone.
There is absolutely nothing in my stack that would delete any file and I've not encountered this behaviour on Mac at any point in the last 30+ years...
In fact i now keep a copy of this little lib in the parent directory (all of these are in a writeable location) to keep copying it back to /CanelaDB/libraries/. This extra file never disappears, so it's unlikely to be a Mac thing.
So i have to ask - is this some internal housekeeping thing by liveCloud? Should i not be keeping other files in this directory?
Many thanks
Stam
-- edit: i should note this happens in the IDE only, i've not tested with standalones; IDE is 9.6.5 (stable) and OS is MacOS Monterey 12.0.1. LiveCloud libraries are the most up-to-date at this point in time.
Hi Stamatis,
I suggest that you create a separate folder to store your custom library in.
I do a similar procedure in my applications and I load them on a preOpen or Open command.
I think that when you do a Canela Liveclouddb update, that is when you lose your library.
this is a copy of the script that I use to load my libraries:
Code:
command Load_App_Libraries, tAppLibraryContents
local tPath, tStack, tLibraryNames, tLContents, tLNames
--THE FOLLOWING CODE WILL only LOAD LIBRARY FILES
filter tAppLibraryContents without empty
filter tAppLibraryContents with "*.lib"
repeat for each line xStackName in tAppLibraryContents
try
start using xStackName
catch error
answer "Please check your Library stack" & cr & " There is an error in your stack " & xStackName
exit to top
end try
end repeat
end Load_App_Libraries