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.
]]>« V14b2. Maybe an older bug.. (Previous Post)
(Next Post) Hi, I created a smart launcher like apps drawer. »
< ![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
]]>
< ![CDATA[
Haha okay. I already made such workaround. Thank you for replying
]]>