Tap Forms Javascript Scripting 102

Viewing 6 reply threads
  • Author
    Posts
  • September 6, 2020 at 4:51 AM #41869

    T.L. Ford
    Participant

    I just finished assembling
    Tap Forms Javascript Scripting 102

    http://www.cattail.nu/tap_forms/tap_forms_scripting_102/index.html

    Do magical things with and to your data and forms.

    This beginner level tutorial:

    * Teaches you about the object model (document, forms, records, fields, values).
    * Teaches you how to access and use the objects in scripts.
    * Teaches you how to apply the documentation.
    * Teaches you how to sort and filter record arrays to create reports.

    To follow this tutorial, you should be familiar with the topics covered in Tap Forms Javascript Scripting 101:
    http://cattail.nu/tap_forms/tap_forms_scripting_101/index_review.html

    Happy coding !!!

    September 8, 2020 at 8:55 PM #41887

    Sam Moffatt
    Participant

    Two quick suggestions:

    If you’re making a screenshot using Command+Shift+4 and hit space it’ll switch it into a mode where it selects whole windows. If you hold option down as you click the window, it won’t add the drop shadow. That will give you a perfect window screenshot for those times you use that.

    In section 9 add the “search”, “Utils” and “console” to the special variable list.

    September 8, 2020 at 10:41 PM #41889

    Daniel Leu
    Participant

    Looking at section 3: I’m not a fan of the

    for (var index = 0, count = records.length; index < count; index++){

    format. I rather use

    for (rec of records) {
       // do something with rec
    }

    If I need an index, then it is just

    for (i in records) {
       // do something with records
    }

    Just my 2cents.

    September 9, 2020 at 12:14 AM #41894

    Sam Moffatt
    Participant

    That comes from the “basic loop” snippet in Tap Forms.

    September 9, 2020 at 12:07 PM #41898

    T.L. Ford
    Participant

    Awesome! Thank you! I updated both pages with notes at the end.

    I tend to default to long-version for loops (hard-wired brain) and forget the other syntax exists 99.5% of the time.

    Sam – what is the purpose of console in that list (presumably referring to the active console window?)? What would you do with it?

    – T

    September 9, 2020 at 1:00 PM #41900

    T.L. Ford
    Participant

    I forgot to mention I’m using snapz pro for screenshots, with some photoshop (for longer windows) and edits. It’s fast, it’s easy… Not terribly worried about shadows (something about how the user would see it on their own screen vs. a nice clean graphic).

    – T

    September 10, 2020 at 1:13 AM #41902

    Sam Moffatt
    Participant

    I was referring to console as in console.log, I’m not sure what overwriting console would do because I’ve not thought to try but it seems prudent that avoiding naming a variable console is a good idea otherwise console.log might not go where it’s supposed to :)

Viewing 6 reply threads

You must be logged in to reply to this topic.