There seems to be weird behavior with custom views: when you do getCurrentScript() in a script that causes a custom…

There seems to be weird behavior with custom views: when you do getCurrentScript() in a script that causes a custom a custom view to load it actually returns the custom view creation script instead of the actual script.

So for example:

alert(getActiveScreen().getContainerById(7).getItemByName(“testCV”).getView().getText())

alert(getCurrentScript().getName())

Will display the text in the textview of the custom view, but after that the name of the creation script of that custom view instead of the name of the script that runs this.

]]>

2 Commentsto There seems to be weird behavior with custom views: when you do getCurrentScript() in a script that causes a custom…

  1. Anonymous says:

    < ![CDATA[

    Indeed, this is wrong. Also the current script is a vague concept and the poor documentation isn’t helping, lol.


    I’m not sure to be able to fix this easily, but if you really need it I can add something like a getCallingScript() function which will be accurate, but not available in scripts called as functions

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Haha okay. I already made such workaround. Thank you for replying

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *