| Issue 3: | dispaching to a non selected state | |
| 1 person starred this issue and may be notified of changes. | Back to list |
doesnt work until the state get focus is that the normal behaviour? afterwords focusing it starts to work like a charm kind regards makerjoe
Jan 12, 2011
Project Member
#1
dineybomfim
Jan 12, 2011
ok , (flex 4) the issue appears when i have for example a form that get visible when a go to it using currentstate="form", meanwhile if i dont go to state="form" and dispatch the nresponder nothing happens, then if i go to state="form" and come back to the default state and again dispatch the nresponder and again got to state "form" the callback function works, am i more clear?, sorry for my bad english..... in other words i have to activate the form state before dipatching from the defaulr state , agains many thanks makejoe
Jan 26, 2011
Hmmm.. OK, I get it now. What happens is the follow: NResponder is framework free. This means, NResponder is not dependent to Flex (mxml) or HaXe or any other. NResponder is pure AS3 So, in your Flex4 application, seems the ActionScript code is initialized just when you call state. You can try initialize the NResponder before your form by other ways or if you prefer, send me your code and I can think in a solution to your code doesn't call the state="form".
Status:
Done
Jan 26, 2011
hi , first thank you for your answers, and second and before sending my code, i test the nresponder initialized only when the state or module or subapplication is perviously initalized and is ok , so i need to have in mind that i cant use states or modules or subapps on demand , i need to have them all initialized at the very beginning , but is not the way to program if i want to have minimum load when the main application starts, (the whole idea of using modules is to have them load on demand and not to load them all at once), on the other hand as you suggested to initilize the nresponder before the module is load has a problem with the handler definition , it is not available because it doesnt exist yet (i hope you follow me) , so again i cant think about dispatching an nresponder from the main application to be listened by a nresponder that lives inside a module that is not been initialized yet because it will load for example when i change a record in the datagrid to update the form that is in the module that is going to be initialized afterwords, so more or less (sorry again for my bad english) what i have to say is that perhaps is not a matter of coding , is a matter of logic , im pretending to listen for a dispatch from a module that is not there when the dispatch was fired what do you think? many thankx |