hi,
What should I do in order to make all onClick buttens to do index button alert?
var myWin = buildUI(this);
if (myWin != null && myWin instanceof Window) {
myWin.show();
}
function buildUI (thisObject) {
if (thisObject instanceof Panel) {
var myWin = thisObject;
} else {
var myWin = new Window ("palette", undefined, [200, 200, 600, 500], {resizeable: true});
}
if (myWin != null ) {
btnGroup=myWin.add("group");
btnGroup.orientation="column"
var AIBtns=[];
var filse=4;
var r=0;
for(r;r<filse;r++){
AIBtns[r]= btnGroup.add("button", undefined,name=[r+1] ,{style:"toolbutton"});
AIBtns[r].onClick=function (AIBtns){
alert(r)//<<
}
}
//~ alert(AIBtns)
myWin.layout.layout(true);
myWin.layout.resize();
myWin.onResizing = myWin.onRize = function () {
this.layout.resize();}
} //if (myWin != null )
return myWin;
} //function buildUI (thisObject)