Re: Creating LiveCode applications that play well with git
Posted: Mon Jun 12, 2017 5:11 pm
Trevor,
I’ve re-visited Levure and the wiki.
Creating a Levure application (Windows 7, LC Community 8.1.3, with git) went smoothly. I was also able to successfully replace the LevureSampleWindow and Levure Sample Window Card Behavior stacks with my own. Although I’m still near the start
I’ll summarize my thoughts so far in the hope that it may be useful to somebody.
I’ve noticed some pages, e.g Building Your Application - ui have just been changed and have already answered some questions / comments I was going to make.
Also, some of the things I mention below now seem obvious to me - but they weren’t when I first encountered them.
General thoughts
* There are many LiveCode concepts in the Levure Wiki which are either new to me or I’ve hardly used but which have to be understood to make progress, e.g. setting a behaviors script for an object. These contribute to making Levure a steep learning curve.
* I made best progress when using the wiki to perform a specific task - in my case swap the sample UI stacks for my own
* It could be helpful to emphasize which parts of the User Guide are functional (necessary to set up & use a Levure app) and which are background information or refinements to the process. The essential bare-bones could be presented first then refinements gradually introduced later.
* The sample app could be used a bit more to assist in explanations. For example, on the ui page under 4. Assign the script-only stacks as behaviors, you could direct readers to have a look at the behaviors tab of the card in the UI stack
Specific questions / feedback
* Is there best practice for closing / saving / exiting / managing a Levure app with all its stacks?
* Following on from this, several times on exiting LiveCode I have seen
Do you want to save changes to stack “LevureStandalone” and all other stacks in the file “standalone.livecode” before closing? Think I said yes to this once by mistake. After this when I opened the standalone.livecode stack I didn’t see the opening window with the Open Application button. Managed to correct this. Reading the wiki I think most times the answer to this should be no - perhaps this could be emphasized.
*Advice for using Git with Levure - is the idea is to open the app repository, e.g. LevureTest for the sample, and track changes to all files except the binary .livecode files?
* Don’t understand Helpers
Are they same as plugins?
Do they exist outside Levure? I’ve seen reference to a Data Grid helper...
Why put something in a helper?
There is a preferences framework helper - but what preferences can be set?
Could you give a link to explain helpers?
* Don’t understand frontscripts / backscripts - are frontscripts related to the preOpenStack handler?
* Levure Sample Window text should be You can delete the sample_window folder…(not main_window folder)
* It wasn’t clear to me that the script name on first line of .livecodescript stack file becomes the name of the stack file in the IDE & doesn’t have to agree with the filesystem name. Not directly a Levure issue but I first noticed it with the sample app
* Adding a script stack to Stack Files tab: Again, not directly a Levure issue but this was first time I’d done this. I noticed that adding in the IDE by browsing to the stack file added the full path - whereas path for Levure Sample Windows Card Behaviour was relative i.e. behaviours/card_behaviour.livecodescript. Initially I couldn’t change this in the IDE. Got it to change later (not sure what was going on). Now the wiki mentions adding by script - is there a recommended place to do this?
* Worth explaining what you can see in the project browser when the sample app is first opened and that other stacks appear there when you run the app in the IDE
* The sample app button mouseUp handler is coded
on mouseUp pBtnNum
if pBtnNum is 1 then...
Why the need for pBtnNum?
Thank you,
Jim
I’ve re-visited Levure and the wiki.
Creating a Levure application (Windows 7, LC Community 8.1.3, with git) went smoothly. I was also able to successfully replace the LevureSampleWindow and Levure Sample Window Card Behavior stacks with my own. Although I’m still near the start
I’ll summarize my thoughts so far in the hope that it may be useful to somebody.
I’ve noticed some pages, e.g Building Your Application - ui have just been changed and have already answered some questions / comments I was going to make.
Also, some of the things I mention below now seem obvious to me - but they weren’t when I first encountered them.
General thoughts
* There are many LiveCode concepts in the Levure Wiki which are either new to me or I’ve hardly used but which have to be understood to make progress, e.g. setting a behaviors script for an object. These contribute to making Levure a steep learning curve.
* I made best progress when using the wiki to perform a specific task - in my case swap the sample UI stacks for my own
* It could be helpful to emphasize which parts of the User Guide are functional (necessary to set up & use a Levure app) and which are background information or refinements to the process. The essential bare-bones could be presented first then refinements gradually introduced later.
* The sample app could be used a bit more to assist in explanations. For example, on the ui page under 4. Assign the script-only stacks as behaviors, you could direct readers to have a look at the behaviors tab of the card in the UI stack
Specific questions / feedback
* Is there best practice for closing / saving / exiting / managing a Levure app with all its stacks?
* Following on from this, several times on exiting LiveCode I have seen
Do you want to save changes to stack “LevureStandalone” and all other stacks in the file “standalone.livecode” before closing? Think I said yes to this once by mistake. After this when I opened the standalone.livecode stack I didn’t see the opening window with the Open Application button. Managed to correct this. Reading the wiki I think most times the answer to this should be no - perhaps this could be emphasized.
*Advice for using Git with Levure - is the idea is to open the app repository, e.g. LevureTest for the sample, and track changes to all files except the binary .livecode files?
* Don’t understand Helpers
Are they same as plugins?
Do they exist outside Levure? I’ve seen reference to a Data Grid helper...
Why put something in a helper?
There is a preferences framework helper - but what preferences can be set?
Could you give a link to explain helpers?
* Don’t understand frontscripts / backscripts - are frontscripts related to the preOpenStack handler?
* Levure Sample Window text should be You can delete the sample_window folder…(not main_window folder)
* It wasn’t clear to me that the script name on first line of .livecodescript stack file becomes the name of the stack file in the IDE & doesn’t have to agree with the filesystem name. Not directly a Levure issue but I first noticed it with the sample app
* Adding a script stack to Stack Files tab: Again, not directly a Levure issue but this was first time I’d done this. I noticed that adding in the IDE by browsing to the stack file added the full path - whereas path for Levure Sample Windows Card Behaviour was relative i.e. behaviours/card_behaviour.livecodescript. Initially I couldn’t change this in the IDE. Got it to change later (not sure what was going on). Now the wiki mentions adding by script - is there a recommended place to do this?
* Worth explaining what you can see in the project browser when the sample app is first opened and that other stacks appear there when you run the app in the IDE
* The sample app button mouseUp handler is coded
on mouseUp pBtnNum
if pBtnNum is 1 then...
Why the need for pBtnNum?
Thank you,
Jim