SQLYoga doesn't work on as standalone app (LC7)

This is the place to post technical queries about SQL Yoga

Moderators: FourthWorld, heatherlaine, Klaus, robinmiller, trevordevore

Post Reply
anttoo
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6
Joined: Tue Oct 13, 2009 4:38 pm

SQLYoga doesn't work on as standalone app (LC7)

Post by anttoo » Mon Aug 31, 2015 3:11 pm

I don' t know if it is LiveCode or SQLYoga, but when I build standalone on LC7 and then do something with database in stanadalone app, nothing happens.
The app works fine in LC7, but not builded. The building process even brake the app in LC7. I have to revert it to saved version and then it works again.
If I build standalone app on LC5 or LC6 all works fine. All standalone settings are the same in all LC versions.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: SQLYoga doesn't work on as standalone app (LC7)

Post by trevordevore » Tue Sep 01, 2015 5:52 pm

I just built a standalone with LC 7 using SQL Yoga and a SQLite database. As long as the database file was in the correct location everything worked fine. One issue I ran into was that the Standalone builder put the SQLite database file in the Resources/_MacOS folder which my original code didn't account for. Can you tell me some more about your project?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

anttoo
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6
Joined: Tue Oct 13, 2009 4:38 pm

Re: SQLYoga doesn't work on as standalone app (LC7)

Post by anttoo » Sun Sep 06, 2015 10:19 am

Application is very simple, only one SQLite table. I put here screen captures so you can see details better in there.
There are images of LC 6.6.2 and LC 7.0.6 application contents and standalone settings which are the same on both versions of LC.
Also an image of applications first window, which is the main control.
Attachments
Capt_2.zip
Screen captures
(165.66 KiB) Downloaded 545 times
Capt_1.zip
Screen captures
(233.41 KiB) Downloaded 534 times

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: SQLYoga doesn't work on as standalone app (LC7)

Post by trevordevore » Thu Sep 17, 2015 6:34 pm

@anttoo - I'm guessing that this has something to do with the standalone building process. There is probably an error being thrown when you launch the standalone which isn't being displayed because it isn't being caught. Can you try adding the following code to a frontscript or library stack so we can see if an error is being generated when launching the standalone?

Code: Select all

on errorDialog p1, p2
   answer p1
   answer p2
end errorDialog
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

anttoo
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6
Joined: Tue Oct 13, 2009 4:38 pm

Re: SQLYoga doesn't work on as standalone app (LC7)

Post by anttoo » Sun Sep 20, 2015 2:55 pm

Now I tried to compile standalone in LC8. After compiling I tried to change time interval of an application on Livecode 8/DP4 and I got an error which is image Livecode.tiff.
The standalone application didn't start and the error came up which is image Standalone.tiff and app freezed. I have to force quit. If you get some idea of these errors.
LC7 standalone throws no errors even if I add your code to a frontscript.
Attachments
Errors.zip
LiveCode 8/DP4 errors
(33.94 KiB) Downloaded 531 times

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: SQLYoga doesn't work on as standalone app (LC7)

Post by trevordevore » Sun Sep 20, 2015 3:43 pm

That error in LC8 looks like this bug (which will be fixed in next LC 8 DP):

http://quality.runrev.com/show_bug.cgi?id=15755

As for LC 7 not reporting an error, is it possible that the error is being sent prior to you inserting a frontscript? Are you inserting the frontscript before running any other code or did you put the errorDialog handler in a library stack that you start using before any other code runs?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

anttoo
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6
Joined: Tue Oct 13, 2009 4:38 pm

Re: SQLYoga doesn't work on as standalone app (LC7)

Post by anttoo » Sun Sep 27, 2015 11:46 am

Now I got error dialog in LC7 app. This is error p1, the other was empty.
Attachments
error_p1.jpg
Error dialog p1

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: SQLYoga doesn't work on as standalone app (LC7)

Post by trevordevore » Mon Sep 28, 2015 5:25 pm

The error means a table doesn't exist in your DB. SQLite will create a new database if you try to connect to a file on disk that doesn't exist. I don't think your SQLite database that has the actual data in it is in the location that your code thinks it is when running as a standalone. The Standalone Builder may be putting it somewhere else. I would confirm that your database file exists where you think it should prior to trying to connect to it. That will tell us if that is indeed the problem.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

anttoo
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6
Joined: Tue Oct 13, 2009 4:38 pm

Re: SQLYoga doesn't work on as standalone app (LC7)

Post by anttoo » Sat Oct 03, 2015 1:34 pm

Standalone Builder put the database in apps folder Contents - Resources - _MacOS. I move it to folder Contents - MacOS. I was wondering that the Contents -folder was two databases, but your last message put me on the right path. The other database was zero byte database, so then I understand that it was created by SQLite. Now with this change I got the standalone working. Thank you for your help.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: SQLYoga doesn't work on as standalone app (LC7)

Post by trevordevore » Sat Oct 03, 2015 2:00 pm

Glad you got it working.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Post Reply

Return to “SQL Yoga”