AEScript writeln has stopped working when called from a Window

New Here ,
Nov 01, 2021 Nov 01, 2021

Copy link to clipboard

Copied

In the attached code, the writeln called from the Window I have created is not displaying in the debug console. The other two do work. This has come up during the upgrade to Visual Studio code and AE V22 and was working previously in the extendscript sdk.  This is obviously a simplified code version. I have an extensive toolkit in AE and would like to see the console results. Any thoughts, am I missing the obvious?

$.writeln("This Works");
function myScript(thisObj) {
    function myScript_buildUI(thisObj) {
        var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Test writeln", undefined, { resizeable: true });
        var res = "group{orientation:'row',\
				myTabbedPanel: Panel{type:'tabbedpanel', text:'',\
					myTab1: Panel{type:'tab', text:'Test',\
						myTabContent1: Button{text:'Writeln will not work'}\
					},\
				},\
			}";

        myPanel.grp = myPanel.add(res);
        myPanel.grp.myTabbedPanel.myTab1.myTabContent1.onClick = function () {
            $.writeln("This No Workie");
            alert(this.text + " button clicked");
        }
        return myPanel;
    }
    var myScriptPal = myScript_buildUI(thisObj);
    if (myScriptPal != null && myScriptPal instanceof Window) {
        myScriptPal.center();
        myScriptPal.show();
    }
}
myScript(this);
$.writeln("This Works");

 

TOPICS
Error or problem , Scripting

Views

72

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 05, 2021 Nov 05, 2021

Copy link to clipboard

Copied

LATEST

to fail to answer my own question well. It seems like a problem is the new debugger. The debug session stops running after the code has finished so it no longer receives input from code run by the created Window. 

For more detail, see this thread for anyone interested.

https://community.adobe.com/t5/exchange-discussions/extendscript-debugger-v1-x-needs-a-rethink/td-p/...

For me, very annoying as I love the new version and the speed improvements. But also love feedback in long, long processes.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines