paul_riggott's profile

361 Messages

 • 

6.9K Points

Fri, Oct 5, 2012 9:34 AM

Bridge: chooseMenuItem command does not work in an onClick function

The chooseMenuItem command in JavaScript for Bridge CS6 32bit and 64bit (O.S. Windows 7) only works in the inline code, it does not work in an new Window('dialog');
w.bu1 = w.add('button',undefined,'Info');
w.bu1.preferredSize=[60,30];
w.bu2 = w.add('button',undefined,'Cancel');
w.bu2.preferredSize=[60,30];
//this will work here
//app.document.chooseMenuItem("mondo/command/about");

w.bu1.function(){
//Will not work here, this applies to all chooseMenuItem commands.
app.document.chooseMenuItem("mondo/command/about");
alert("Command given to show about");
}
w.show();

Responses

No Responses!