|
jovibals
|
 |
« on: January 17, 2010, 08:42:10 PM » |
|
hi linb please observe this example i had. I tried selecting the same dates and display it in listbox. then, Removing same dates in listbox doesn't take effect. Is this a bug or an error?
Class('App', 'linb.Com',{ Instance:{ iniComponents:function(){ // [[code created by jsLinb UI Builder var host=this, children=[], append=function(child){children.push(child.get(0))}; append((new linb.UI.DatePicker) .host(host,"datepicker1") .setLeft(40) .setTop(60) .afterUIValueSet("_datepicker1_aftervalueupdated") ); append((new linb.UI.List) .host(host,"list3") .setLeft(260) .setTop(60) .setHeight(180) .setValue("a") ); append((new linb.UI.Button) .host(host,"button9") .setLeft(260) .setTop(250) .setCaption("Remove") .onClick("_button9_onclick") ); return children; // ]]code created by jsLinb UI Builder }, events:{}, iniResource:function(com, threadid){ }, iniExComs:function(com, hreadid){ }, _button9_onclick:function (profile, e, src, value) { var i = this.list3.getUIValue(); this.list3.removeItems(i); }, _datepicker1_aftervalueupdated:function (profile, oldValue, newValue) { var d = newValue; var newdateresult = linb.Date.get(d,"m") + 1 + "/" + linb.Date.get(d,"d") + "/" + linb.Date.get(d,"y"); this.list3.insertItems(newdateresult ); } } });
|