Skip to main content
1-Visitor
Jul 4, 2016 9:37 AM UTC
Solved

API documentation for JavaScript

hello,

I'm new to Javascript and have a few questions:

I can install the Eclipse SDK and understand the java related documentation, but how do I deal with the built-in JavaScript API in the Composer?

There is no IDE, so I have to rely on my own common sense, JS knowledge and syntax checks in the Composer, right?

It's kind of obvious that me means the same as Things['ThingName']​, but is there any specially dedicated section in the help centre for basics like this?

1-Visitor
Jul 4, 2016 10:12 AM UTC

Hi,

This is the most extensive repository about TW Documentation: https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS232833&art_lang=en&posno=1&q=thingworx%20documentation&source…​

But I don't think you will find specific Javascript documentation for the Composer. You should learn it with the code Snippets section on the Composer itself.

About your question of me  and Things['ThingName']:

  • me --> Yes a reference to myself ( on the thing where service it's called )
  • Things['ThingName'] --> A reference to the given 'ThingName'
  • Things[me.name] --> A reference to myself, mostly equal to me, but there's some edge cases that it's not exactly the same ( for instance if a Restart on the thing was executed while you were executing the Script ).

2 replies

1-Visitor
Jul 4, 2016 10:12 AM UTC

Hi,

This is the most extensive repository about TW Documentation: https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS232833&art_lang=en&posno=1&q=thingworx%20documentation&source…​

But I don't think you will find specific Javascript documentation for the Composer. You should learn it with the code Snippets section on the Composer itself.

About your question of me  and Things['ThingName']:

  • me --> Yes a reference to myself ( on the thing where service it's called )
  • Things['ThingName'] --> A reference to the given 'ThingName'
  • Things[me.name] --> A reference to myself, mostly equal to me, but there's some edge cases that it's not exactly the same ( for instance if a Restart on the thing was executed while you were executing the Script ).
Translate
1-Visitor
Jul 12, 2016 9:15 AM UTC

thank you Carles

the documentation repository link is really useful.

I've read about different keywords for current object reference, but was confused that me doesn't seem JS-specific.

I thought if its TW-specific, it would be documented somewhere and i had skipped the information.

Translate