Creating LiveCode applications that play well with git

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
jim1001
Posts: 140
Joined: Fri Jan 29, 2016 6:25 pm

Re: Creating LiveCode applications that play well with git

Post by jim1001 » Thu Jun 15, 2017 6:48 pm

Sorry - misunderstood your previous post. I connected my Android tablet to the PC & checked it was there in Development - Test Target. Then I entered levurePackageApplication "android simulator" in the Message Box. Hope those were the right steps! Saw a lot of activity then:

executing at 6:32:16 PM
Type Object: can't set object property
Object Levure Framework Application Packager
Line set the password of stack tTargetStackFilename to sPassword
Hint packagerPackageApplication

executing at 6:32:15 PM
Type Object: can't set object property
Object Levure Framework Application Packager
Line set the password of stack tTargetStackFilename to sPassword
Hint packagerPackageApplication

executing at 6:32:15 PM
Type Object: can't set object property
Object Levure Framework Application Packager
Line set the password of stack tTargetStackFilename to sPassword
Hint stack "xxx/MyLevureTest/levure/packager/packager.livecodescript"

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 851
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating LiveCode applications that play well with git

Post by trevordevore » Thu Jun 15, 2017 6:59 pm

Are you using Community? If so then you will need to update Levure. I fixed some Community issues earlier in the week.

https://github.com/trevordevore/levure/ ... ing-Levure
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

jim1001
Posts: 140
Joined: Fri Jan 29, 2016 6:25 pm

Re: Creating LiveCode applications that play well with git

Post by jim1001 » Thu Jun 15, 2017 9:17 pm

OK, I updated Levure as you said & re-ran. This time it built & installed on the tablet. Got the Open Application button. However it did nothing when clicked. When I went back to LC IDE on Windows I saw the dialog box attached...
Attachments
screenshot.18.jpg

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 851
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating LiveCode applications that play well with git

Post by trevordevore » Thu Jun 15, 2017 10:39 pm

Alright, we are in business. Last night I made some changes so that errors would be displayed if you tried to use preferences without first configuring a preference file name. The version of the appp creator stack that you used, however, uses a call to the preferences API in the app.livecodescript file. You can either remove the prefsGetPref call from app.livecodescript or just start from scratch and create a new app. The new app creator no longer adds calls to the preferences API.
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

jim1001
Posts: 140
Joined: Fri Jan 29, 2016 6:25 pm

Re: Creating LiveCode applications that play well with git

Post by jim1001 » Fri Jun 16, 2017 12:25 pm

Created a new application by using the Levure project creator as per wiki.
Loaded it in the IDE (didn't make any changes to the sample application)
Configured the Android standalone settings for LevureStandalone.
Ran levurePackageApplication "android simulator" via Message Box.

The app appeared on my connected Android tablet. No error messages anywhere up to now. However clicking the Open Application button gave the message "LevureStandalone has stopped".

I was convinced it was going to work too :(

Any more ideas Trevor? Thanks.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 851
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating LiveCode applications that play well with git

Post by trevordevore » Fri Jun 16, 2017 2:07 pm

We could be running into a LiveCode bug at this point. Which version of LC are you testing with? If you aren't using 8.1.5 RC-1 can you try it?

You could also try removing the answer commands that you have in preopenstack and openstack to see if that affects anything.

Does android generate logs anywhere that would record the cause of the crash?
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

jim1001
Posts: 140
Joined: Fri Jan 29, 2016 6:25 pm

Re: Creating LiveCode applications that play well with git

Post by jim1001 » Fri Jun 16, 2017 5:44 pm

Tried with 8.1.5 RC-1.

App installs on target tablet but get same when Open Application button pressed. However now I get the warning dialog in the LC IDE attached - no idea why. This is after restarting LC and immediately loading standalone.livecode of the sample app.
You could also try removing the answer commands that you have in preopenstack and openstack to see if that affects anything.
I'm now using the unchanged sample app provided by the project creator
Does android generate logs anywhere that would record the cause of the crash?
Am looking into that.

Thanks.
Attachments
screenshot.19_New.jpg

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 851
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating LiveCode applications that play well with git

Post by trevordevore » Fri Jun 16, 2017 5:49 pm

Regarding error dialog, if you open Preferences and go to the Files & Memory section what is the setting for "If destroyStack is false, when closing last stack in file:"? If it is "ask" can you try changing it to "Don't close the file"?

If you can find some sort of log that reports the error let me know. I tried building a default Levure app for iOS again and it works so the issue isn't something obvious, at least not to me.
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

jim1001
Posts: 140
Joined: Fri Jan 29, 2016 6:25 pm

Re: Creating LiveCode applications that play well with git

Post by jim1001 » Fri Jun 16, 2017 5:55 pm

Regarding error dialog, if you open Preferences and go to the Files & Memory section what is the setting for "If destroyStack is false, when closing last stack in file:"? If it is "ask" can you try changing it to "Don't close the file"?
Meant to say that. I have it already set to "Don't close the file" (also have destroyStack true for new stacks)
If you can find some sort of log that reports the error let me know.
OK - will do. Ta.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 851
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating LiveCode applications that play well with git

Post by trevordevore » Fri Jun 16, 2017 6:01 pm

Okay. You might avoid the error dialog by only opening the standalone.livecode file and trying to build without loading the entire application. Some changes need to be made to the LiveCode standalone building process. Right now there is a lot of loading/unloading of stacks and it can sometimes lead to problems.
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

jim1001
Posts: 140
Joined: Fri Jan 29, 2016 6:25 pm

Re: Creating LiveCode applications that play well with git

Post by jim1001 » Fri Jun 16, 2017 11:15 pm

You might avoid the error dialog by only opening the standalone.livecode file and trying to build without loading the entire application.
Error dialog doesn't appear in Community 8.1.4 after build whether entire app is loaded or not.

Error dialog appears in Community 8.1.5 RC-1 after build and only opening standalone.livecode (not entire application).

I have an Android error log & will post in a private message.

Thanks.

jim1001
Posts: 140
Joined: Fri Jan 29, 2016 6:25 pm

Re: Creating LiveCode applications that play well with git

Post by jim1001 » Tue Jun 20, 2017 2:40 pm

Hi Trevor,

Until testing is working for Android I thought as a stopgap I'd have a look at building a full Levure Android app.

I’ve looked at the pages
https://github.com/trevordevore/levure/wiki/packager and
https://github.com/trevordevore/levure/ ... lds-Folder

I assume I need to configure Standalone Application settings for the UI stack, i.e. LevureSampleWindow for the sample app? LevureStandalone doesn't figure in the final build - is that right?

Where do you set the version & build properties mentioned in wiki/packager - Version information and where / how do I set up a build profile?

Thanks.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 851
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating LiveCode applications that play well with git

Post by trevordevore » Tue Jun 20, 2017 3:14 pm

I've updated the https://github.com/trevordevore/levure/wiki/packager page with more information about what you need to do before packaging the application. You use the File > Standalone Application Settings menu in LiveCode to configure the standalone settings for the standalone.livecode stack file (LevureStandalone in memory).

All application settings configuration is done in the app.yml file. The app.yml file that was created when you created your app already has a build profiles entry in it. It also has version and build settings. See this page for details on app.yml file: https://github.com/trevordevore/levure/wiki/app.yml

I fixed a broken link to the FAQ on the copy files section on the packager page. Here is the link: https://github.com/trevordevore/levure/ ... -builds%3F

Though not directly related to your question, I will mention that I added two new screencasts to my YouTube channel. One talks about creating a new app in Levure and the other shows how to add UI stacks to your application.

https://www.youtube.com/channel/UCluXVD ... JmCMssc0fw
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

jim1001
Posts: 140
Joined: Fri Jan 29, 2016 6:25 pm

Re: Creating LiveCode applications that play well with git

Post by jim1001 » Thu Jun 22, 2017 7:11 pm

Thanks Trevor - much clearer now.

I added a development line in app.yml (there wasn't one there) and tried a build of the sample app for android. I didn't add anything to the profile.

Got the attached error.

Does name set in app.yml have anything to do with Standalone Application Settings - General - Standalone name or Standalone Application Settings - Android -Label?
Does version set in app.yml have anything to do with Standalone Application Settings - Android - Version Name?

Best,
Jim
Attachments
screenshot.20_New.jpg

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 851
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating LiveCode applications that play well with git

Post by trevordevore » Thu Jun 22, 2017 7:34 pm

I ran into that same error the other day. The rename command doesn't work with network folders. Try moving your Levure project to the local drive on Windows and try again. It should work.

The name and version in app.yml will be used to create the standalone name and version. It is possible that it will need to be applied to the android specific build settings as well.
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

Post Reply

Return to “Talking LiveCode”