Hi David,
Many thanks for your tutorial series. This is really big great job!
But I not understand how can I add dynamic code to my UI panels?
Here's my code:
{ var a = "It's working!"; function myScript(thisObj){ function myScript_buildUI(thisObj){ var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "AE вещает ёпт", undefined); res = "group{orientation:'row', alligment:['fill','fill'], alignChildren:['fill','fill'],\ groupOne: Group{orientation:'column', alligment:['fill','fill'], alignChildren:['fill','fill'],\ myImage: Image{text:'nothing', image:'~/Desktop/joy.png'}, alligment:['fill','top'],\ myButton: Button{text:'Ok'}, alligment:['fill','top'],\ },\ groupTwo: Group{orientation:'column',\ myStaticText: StaticText{text:'Пора играть в Diablo III - Даже AE тебе говорит епт'}, alligment:['fill','top'],\ mySlider: Slider{text:'slider', value:'50'}, alligment:['fill','top'],\ },\ }"; myPanel.grp = myPanel.add(res); // размер окна myPanel.layout.layout(true); myPanel.grp.minimumSize = myPanel.grp.size; //изменяемый размер панелей myPanel.layout.resize(); myPanel.onResizing = myPanel.onResize = function(){this.layout.resize()}; return myPanel; } var myScriptPal = myScript_buildUI(thisObj); if((myScriptPal != null) && (myScriptPal instanceof Window)){ myScriptPal.center(); myScriptPal.show(); } } myScript(this); }
I'll try to explain. I want click on my "Ok" Button and she say
alert(a);
The question is,how do I makedynamicelements in this code. How to programfor example- myButton. ShouldI turn to the "res" files or not? And how it work? Thanks for your time David.