[SUGGESTION]: Functions as object properties

Answered

Comments

3 comments

  • Russell Kay

    Thank you for your thoughts, we have plans for the future around adding Methods to Objects in the IDE, but for this release it will remain as is.

    Object Variables can already be assigned a script function, there is a bug in the current beta that errors on this, but it will be fixed in a future release.

    We will not be binding methods to events (as there is a different underlying mechanism going on there).

    Side Notes:

    1) script_execute takes a script resource index, all functions have a script resource index and you can use those.

    2) we already mention this in every script in the linked page.

    3) JSDoc is here to stay.

    Russell

    0
    Comment actions Permalink
  • cicadian

    Thanks for the good news! And thanks for helping my confusion, with so many new IDE changes it's kind of overwhelming to keep track of everything new.

    I wasn't trying to imply I wanted JSDoc gone. I was trying to say that If you're going to put a large quantity of functions in a script then the JSDoc isn't currently included in the function code folding, so you can get some pretty hefty line counts between functions without explicit use of regions.

    0
    Comment actions Permalink
  • Julian Adams

    I wonder if being able to put the JSDoc inside the function body would solve that problem 🤔

    0
    Comment actions Permalink

Please sign in to leave a comment.