flex - Not sure why my program seems to be skipping some functions? -


hey there, i'm little confused actionscript i'm working on. gui, have written 4 functions times when computing taking place. these showmessage("loading text..."), disablebuttons(), clearmessage(), , enablebuttons(). work great throughout program. showmessage displays loading message, disablebuttons disables buttons no 1 can click anything, clearmessage clears loading message when job done, , enablebuttons turns them on.

for reason, there 1 button click handler giving me troubles , i'm not sure why. i've set others similar (which work) 1 doesn't display message or shut off buttons. here clickhandler...

private function buffer_route_clickhandler():void         {             showmessage("loading rbe options");             disablebuttons();              if(buffer_route.selected && rbeac.length == 0){                 createrbeac();             }         } 

and here creatrbeac function...

private function createrbeac():void {                    rbeac.removeall();     hiddenrbelayers.removeall();      var rbeids:array = rbeconfiglist.getkeyset();     each (var rbeid:int in rbeids)     {                var rbeconfig:hashtable = rbeconfiglist.find(rbeid) hashtable;         var rbedata:object =          {             resturl:rbeconfig.find("rberesturl") string,             layername:rbeconfig.find("rbelayername") string,             icon: rbeconfig.find("rbeicon") string,              titlefield: rbeconfig.find("rbetitlefield") string,             checked: rbeconfig.find("rbechecked") string,             count: "0" string         };                           if(rbedata.checked == "false")         {                                hiddenrbelayers.additem(rbedata.layername);// string);         }         rbeac.additem(rbedata);              } } 

i wasn't getting loading text, took out clearmessage , enablebuttons functions code see if adding message , disabling buttons begin with. still not getting though. since clearmessage , enablebuttons no found in button click handler or creatrbeac function, can not understand why loading message , buttons aren't disabled, when computing finished.

some things note. if comment out creatrbeac function, loading message shows , buttons disable. if functions being ignored when creatrbeac function in code.

any help? appreciate it. have provided enough information.

in actual app, have similiar problems. in eventhandler (it doesn't matter, if there button handler or mouse handler), wan't disable app , use filter functions arraycollection.

unfortunately, action seems need ressources, especialy, when app run in debug mode. have waint next screnn refresh. try implement "applyfiltermethod" in eventhandler

calllater(applyfiltermethod) 

but wo't work.

finally, settimeout(applyfiltermethod,500) 

solved issue. so, try timeout-method, if have luck.

br frank


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -