<html><head></head><body><div><div><div><div>You're welcome, Daniel. And glad the tutorials helped!<br/></div><div><br/></div><div>If you ever have any issues contributing to the GitHub repo, feel free to ask here, the <a href="https://www.facebook.com/groups/742277119576336" target="_blank">JW Lua Facebook</a> group, or directly on GitHub.<br/></div><div><br/></div><div>Nick</div></div><div><div style="display: none; border: 0px; width: 0px; height: 0px; overflow: hidden; visibility: hidden;"><img src="https://r.superhuman.com/cOCX0lwTC4U1RTypE6_q2dGZiMW_BWvusQvHVOCT6olinvNJQi5Q5Xg2pH5NZQ89JHWuY-ha82dygDgw6VDbfr1eb7qeSWked5E_rJCr55Xej4vIcoGWmwYaYkWm5XLUKms53S0oAwLSVUr99UMGhle26Llnsq5snmnMfAqUvwbuQnlV.gif" alt=" " width="1" height="0" style="display: none; border: 0px; width: 0px; height: 0px; overflow: hidden; visibility: hidden;"/><!-- --></div><br/><div class="gmail_signature"></div></div><br/><div><div class="gmail_quote">On Sun, Sep 12, 2021 at 4:09 PM, <span dir="ltr"><<a href="mailto:dgr@leng.de" target="_blank">dgr@leng.de</a>></span> wrote:<br/><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote sh-color-black sh-color" style="null" id="null"><p class="sh-color-black sh-color">Dear Nick,
</p><p class="sh-color-black sh-color">
thank you very much for you decent reply. I already feared that testing in JWLua comes down
to manual testing only. However now I (sadly) know for sure.
</p><p class="sh-color-black sh-color">
Although I have not yet used git I will dig into it and will proudly provide my scripts as soon I
got something worth sharing. I didn't know about this repo until now. It seems a great
ressource. Thanks very much for that hint. (I really like it that there is a style guide. I love
style guides.)
</p><p class="sh-color-black sh-color">
By the way thanks very much for your tutorials, they help a lot to get started. I checked them
out some months ago.
</p><p class="sh-color-black sh-color">
Best regards
</p><p class="sh-color-black sh-color">
Daniel
</p><p class="sh-color-black sh-color">
Am <span class="sh-date" data-date-isostring="2021-09-12T07:00:00.000Z">12 Sep 2021</span> um 12:00 hat <a target="_blank" rel="noopener noreferrer" href="mailto:jwlua-request@jwmusic.nu">jwlua-request@<wbr/>jwmusic.<wbr/>nu</a> geschrieben:
</p><blockquote class="sh-color-black sh-color"><p class="sh-color-black sh-color">
Send JWLua mailing list submissions to
<br/>
<a target="_blank" rel="noopener noreferrer" href="mailto:jwlua@jwmusic.nu">jwlua@<wbr/>jwmusic.<wbr/>nu</a>
</p><p class="sh-color-black sh-color">
To subscribe or unsubscribe via the World Wide Web, visit
<a target="_blank" rel="noopener noreferrer" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http:/<wbr/>/<wbr/>jwmusic.<wbr/>nu/<wbr/>mailman/<wbr/>listinfo/<wbr/>jwlua_jwmusic.<wbr/>nu</a>
or, via email, send a message with subject or body 'help' to
<a target="_blank" rel="noopener noreferrer" href="mailto:jwlua-request@jwmusic.nu">jwlua-request@<wbr/>jwmusic.<wbr/>nu</a>
</p><p class="sh-color-black sh-color">
You can reach the person managing the list at
<br/>
<a target="_blank" rel="noopener noreferrer" href="mailto:jwlua-owner@jwmusic.nu">jwlua-owner@<wbr/>jwmusic.<wbr/>nu</a>
</p><p class="sh-color-black sh-color">
When replying, please edit your Subject line so it is more specific
than "Re: Contents of JWLua digest..."
</p><p class="sh-color-black sh-color">
<span class="sh-date" data-date-isostring="2021-09-12T22:00:00.000Z">Today</span>'s Topics:
</p><p class="sh-color-black sh-color">
1. Unit-testing with jwlua scripts? (<a target="_blank" rel="noopener noreferrer" href="mailto:dgr@leng.de">dgr@<wbr/>leng.<wbr/>de</a>)
<br/>
2. Re: Unit-testing with jwlua scripts? (Nick Mazuk)
</p><p class="sh-color-black sh-color">
----------------------------------------------------------------------
</p><p class="sh-color-black sh-color">
Message: 1
<br/>
Date: <span class="sh-date" data-date-isostring="2021-09-18T14:00:00.000Z">Sat</span>, <span class="sh-date" data-date-isostring="2021-09-11T07:00:00.000Z">11 Sep 2021</span> 20:13:18 +0200
<br/>
From: <a target="_blank" rel="noopener noreferrer" href="mailto:dgr@leng.de">dgr@<wbr/>leng.<wbr/>de</a>
<br/>
To: <a target="_blank" rel="noopener noreferrer" href="mailto:jwlua@jwmusic.nu">jwlua@<wbr/>jwmusic.<wbr/>nu</a>
<br/>
Subject: [JW Lua] Unit-testing with jwlua scripts?
Message-ID: <<a target="_blank" rel="noopener noreferrer" href="mailto:613CF1BE.20776.58E10D4@dgr.leng.de">613CF1BE.<wbr/>20776.<wbr/>58E10D4@<wbr/>dgr.<wbr/>leng.<wbr/>de</a>>
Content-Type: text/plain; charset=US-ASCII
</p><p class="sh-color-black sh-color">
Hi guys,
</p><p class="sh-color-black sh-color">
I am new to JWLua and Lua in general. (However I am not new to software development,
see below.) I want to implement new features into Finale needed for classical guitar notation.
I begged make music years ago to implement them. They told me liking my ideas but never
implemented any of it. So I probably will have to go for myself because I am sick of the
cumbersome and time-consuming editing due to lack of proper tools.
</p><p class="sh-color-black sh-color">
I have been educated with C (mostly embedded), have little experience in C++ and am
coding in C# currently. I read the programming in lua book but still have trouble to understand
some of the concepts. Therefore I assume I will have to ask a lot of questions on this channel
and will appreciate anyone who answers.
</p><p class="sh-color-black sh-color">
<span class="sh-date" data-date-isostring="2021-09-12T22:00:00.000Z">Today</span> my first question: Is there any kind of unit testing framework or alike to use inside
JWLua? I am getting used to test-driven-development and would like to do this here as well,
if possible.
</p><p class="sh-color-black sh-color">
And second question: What is the best way to code object-oriented in JWLua?
</p><p class="sh-color-black sh-color">
Thank for your kind help in advance.
</p><p class="sh-color-black sh-color">
Daniel Grunwald
</p><p class="sh-color-black sh-color">
------------------------------
</p><p class="sh-color-black sh-color">
Message: 2
<br/>
Date: <span class="sh-date" data-date-isostring="2021-09-18T14:00:00.000Z">Sat</span>, <span class="sh-date" data-date-isostring="2021-09-11T07:00:00.000Z">11 Sep 2021</span> 19:26:58 +0000
<br/>
From: "Nick Mazuk" <<a target="_blank" rel="noopener noreferrer" href="mailto:nick@nickmazuk.com">nick@<wbr/>nickmazuk.<wbr/>com</a>>
To: "The JW Lua script plug-in." <<a target="_blank" rel="noopener noreferrer" href="mailto:jwlua@jwmusic.nu">jwlua@<wbr/>jwmusic.<wbr/>nu</a>>
Subject: Re: [JW Lua] Unit-testing with jwlua scripts?
Message-ID:
<br/>
<<a target="_blank" rel="noopener noreferrer" href="mailto:ktg616o5.006beeeb-b72b-4e70-8868-9f116d037c62@we.are.superhuman.com">ktg616o5.<wbr/>006beeeb-b72b-4e70-8868-9f116d037c62@<wbr/>we.<wbr/>are.<wbr/>superhuman.<wbr/>com</a>>
Content-Type: text/plain; charset="utf-8"
</p><p class="sh-color-black sh-color">
Hi Daniel,
</p><p class="sh-color-black sh-color">
Glad that you're interested in coding with JW Lua! Many of us also write these Lua scripts to implement features MakeMusic hasn't. Now about your questions.
</p><p class="sh-color-black sh-color">
*Unit testing*
</p><p class="sh-color-black sh-color">
Testing is a feature that's missing in JW Lua. Lua (the language that powers JW Lua) does have several testing frameworks you can use, but because JW Lua adds so many features on top of regular Lua, you likely won't be able to use any of these frameworks.
</p><p class="sh-color-black sh-color">
Currently, the best way to test JW Lua scripts is to create a Finale document with all your test cases, run the script, and manually compare the output to what you want. This is definitely not as good as automated testing, but it's better than nothing.
</p><p class="sh-color-black sh-color">
*OOP*
</p><p class="sh-color-black sh-color">
Lua does not have objects, classes, inheritance, or most other features you'd expect with object oriented programming. The closest thing is a "table" (like a dictionary in Python or a hash map in Javascript). So the code you write is mostly going to be functional (which realistically this works really well for JW Lua).
</p><p class="sh-color-black sh-color">
However, Finale it's self uses OOP. So JW Lua extends the Lua language with "Finale objects". Anytime you see something like `local entry = finale.FCNoteEntry()` , you are instantiating a new note entry object. You can check out the class browser (which is inside the plugin) for all the objects, methods, and properties that JW Lua adds.
</p><p class="sh-color-black sh-color">
Does this make sense?
</p><p class="sh-color-black sh-color">
Also, since you're coming from the C family of languages, note that Lua is much simpler. For instance, you don't need to keep track of memory management and Lua is not statically typed (e.g., you don't need to declare an integer as an int).
</p><p class="sh-color-black sh-color">
One thing you may wish to do is to contribute to a GitHub repository of Lua scripts that several of us have put together. We have a standard library of functions that takes care of many things that you might now want to do by hand (e.g., figuring out how to transpose notes). If you want to share your scripts, contributing to this repository makes it dead simple. Let me know if you want to learn more about it. <a target="_blank" rel="noopener noreferrer" href="https://github.com/Nick-Mazuk/jw-lua-scripts">https:/<wbr/>/<wbr/>github.<wbr/>com/<wbr/>Nick-Mazuk/<wbr/>jw-lua-scripts</a>
</p><p class="sh-color-black sh-color">
Best,
</p><p class="sh-color-black sh-color">
Nick
</p><p class="sh-color-black sh-color">
On Sat, Sep 11, 2021 at 11:13 AM, < <a target="_blank" rel="noopener noreferrer" href="mailto:dgr@leng.de">dgr@<wbr/>leng.<wbr/>de</a> > wrote:
</p><blockquote class="sh-color-black sh-color"><p class="sh-color-black sh-color">
Hi guys,
</p><p class="sh-color-black sh-color">
I am new to JWLua and Lua in general. (However I am not new to software
development, see below.) I want to implement new features into Finale
needed for classical guitar notation. I begged make music years ago to
implement them. They told me liking my ideas but never implemented any of
it. So I probably will have to go for myself because I am sick of the
cumbersome and time-consuming editing due to lack of proper tools.
</p><p class="sh-color-black sh-color">
I have been educated with C (mostly embedded), have little experience in
C++ and am coding in C# currently. I read the programming in lua book but
still have trouble to understand some of the concepts. Therefore I assume
I will have to ask a lot of questions on this channel and will appreciate
anyone who answers.
</p><p class="sh-color-black sh-color">
<span class="sh-date" data-date-isostring="2021-09-12T22:00:00.000Z">Today</span> my first question: Is there any kind of unit testing framework or
alike to use inside JWLua? I am getting used to test-driven-development
and would like to do this here as well, if possible.
</p><p class="sh-color-black sh-color">
And second question: What is the best way to code object-oriented in
JWLua?
</p><p class="sh-color-black sh-color">
Thank for your kind help in advance.
</p><p class="sh-color-black sh-color">
Daniel Grunwald
</p><p class="sh-color-black sh-color">
_______________________________________________
<br/>
JWLua mailing list
<br/>
JWLua@ jwmusic. nu ( <a target="_blank" rel="noopener noreferrer" href="mailto:JWLua@jwmusic.nu">JWLua@<wbr/>jwmusic.<wbr/>nu</a> )
<br/>
http:/ / jwmusic. nu/ mailman/ listinfo/ jwlua_jwmusic. nu (
<a target="_blank" rel="noopener noreferrer" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http:/<wbr/>/<wbr/>jwmusic.<wbr/>nu/<wbr/>mailman/<wbr/>listinfo/<wbr/>jwlua_jwmusic.<wbr/>nu</a> )
</p></blockquote><p class="sh-color-black sh-color">
-------------- next part --------------
<br/>
An HTML attachment was scrubbed...
<br/>
URL: <<a target="_blank" rel="noopener noreferrer" href="http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20210911/51643227/attachment-0001.html">http:/<wbr/>/<wbr/>jwmusic.<wbr/>nu/<wbr/>pipermail/<wbr/>jwlua_jwmusic.<wbr/>nu/<wbr/>attachments/<wbr/>20210911/<wbr/>51643227/<wbr/>attachment-0001.<wbr/>html</a>>
</p><p class="sh-color-black sh-color">
------------------------------
</p><p class="sh-color-black sh-color">
Subject: Digest Footer
</p><p class="sh-color-black sh-color">
_______________________________________________
<br/>
JWLua mailing list
<br/>
<a target="_blank" rel="noopener noreferrer" href="mailto:JWLua@jwmusic.nu">JWLua@<wbr/>jwmusic.<wbr/>nu</a>
<br/>
<a target="_blank" rel="noopener noreferrer" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http:/<wbr/>/<wbr/>jwmusic.<wbr/>nu/<wbr/>mailman/<wbr/>listinfo/<wbr/>jwlua_jwmusic.<wbr/>nu</a>
</p><p class="sh-color-black sh-color">
------------------------------
</p><p class="sh-color-black sh-color">
End of JWLua Digest, Vol 83, Issue 2
<br/>
************************************
</p></blockquote><p class="sh-color-black sh-color">
_______________________________________________
<br/>
JWLua mailing list
<br/>
<a target="_blank" rel="noopener noreferrer" href="mailto:JWLua@jwmusic.nu">JWLua@<wbr/>jwmusic.<wbr/>nu</a>
<br/>
<a target="_blank" rel="noopener noreferrer" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http:/<wbr/>/<wbr/>jwmusic.<wbr/>nu/<wbr/>mailman/<wbr/>listinfo/<wbr/>jwlua_jwmusic.<wbr/>nu</a></p></div></div></blockquote></div></div><br/></div></div></body></html>