Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Script Talk › Tap Forms Javascript Scripting 102
- This topic has 6 replies, 3 voices, and was last updated 4 years, 2 months ago by Sam Moffatt.
-
AuthorPosts
-
September 6, 2020 at 4:51 AM #41869
T.L. FordParticipantI just finished assembling
Tap Forms Javascript Scripting 102http://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.htmlHappy coding !!!
September 8, 2020 at 8:55 PM #41887
Sam MoffattParticipantTwo 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 LeuParticipantLooking 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 MoffattParticipantThat comes from the “basic loop” snippet in Tap Forms.
September 9, 2020 at 12:07 PM #41898
T.L. FordParticipantAwesome! 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. FordParticipantI 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 MoffattParticipantI was referring to
console
as inconsole.log
, I’m not sure what overwritingconsole
would do because I’ve not thought to try but it seems prudent that avoiding naming a variableconsole
is a good idea otherwiseconsole.log
might not go where it’s supposed to :) -
AuthorPosts
You must be logged in to reply to this topic.