[flexcoders] Re: FocusOut event fires over and over...
It may be a bug (Or a feature) in the SDK. I seem to recall Alex responding about when a pop-up closes, focus returns to the control that opened the pop-up. You may like to search the archives. One other thing to try would be adding an event listener for when the pop-up closes that prevents a new pop-up being opened until new text is placed in the text input. --- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote: That doesn't seem to work either. Focus keeps returning to the original TextInput for some reason... I've even tried manually setting the focus to the next TextInput immediately after removing the FocusOut event listener on the first TextInput, before calling the pop-up window -- still doesn't work right; focus keeps going back to the first TextInput when the pop-up window closes. Now, if I click somewhere else on the screen -- in other words, I don't click or tab into the next TextInput -- the window pops up just the one time... I do not have any FocusIn or FocusOut parameters set in that second TextInput, so I don't know why clicking or tabbing into that second TextInput would cause the problem... Anything else I should try? This is just ridiculous -- it *should* work, but for some reason focus keeps getting sent back to the first TextInput. I'm running Flex Builder 3.5a, and Flash Player 10,0,42,34. Thanks, L --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Add the focusOut event listener when you get a focusIn on the text input. Then, when your focusOut event fires and you open the pop-up window, remove the focusOut event listener from the text input. --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote: I want a pop-up window to appear when someone tabs out of a particular TextInput in my app. So I simply set its FocusOut event equal to the function that makes the pop-up window appear... Sounds simple enough, right? But the FocusOut event keeps occurring over and over... I type something into the TextInput then hit Tab. The pop-up window pops up the way it's supposed to. I select something in the pop-up window (or close it without selecting anything) and it pops right back up. It's like my TextInput is re-gaining focus and then losing it again (which makes the window pop-up, again, forcing me to select something or close the window, which makes it happen again, etc., etc) So how do I prevent this from happening? Why is FocusOut occurring over and over and over like that? I've tried, in my FocusOut handler, setting the focus onto another TextInput before calling the pop-up window, but that does no good -- same exact results. This is incredibly frustrating! Anyone have any ideas? Thanks, Laurence MacNeill Mableton, Georgia, USA
Re: [flexcoders] Re: FocusOut event fires over and over...
Valdhor has a good memory, but that doesn’t sound like the issue here. Other things to check: Does the Popup implement IFocusManagerContainer (it does if it is a Panel/TitleWindow) and do you have code in the popup that sets focus to a control in the PopUp on initialize or creationComplete event (if not you should)? Then fall back on using callLater so the FocusManager can finish doing its TAB thing before you create the popup. Sorry I didn’t read this thread sooner. On 3/25/10 1:41 PM, valdhor valdhorli...@embarqmail.com wrote: It may be a bug (Or a feature) in the SDK. I seem to recall Alex responding about when a pop-up closes, focus returns to the control that opened the pop-up. You may like to search the archives. One other thing to try would be adding an event listener for when the pop-up closes that prevents a new pop-up being opened until new text is placed in the text input. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Laurence lmacne...@... wrote: That doesn't seem to work either. Focus keeps returning to the original TextInput for some reason... I've even tried manually setting the focus to the next TextInput immediately after removing the FocusOut event listener on the first TextInput, before calling the pop-up window -- still doesn't work right; focus keeps going back to the first TextInput when the pop-up window closes. Now, if I click somewhere else on the screen -- in other words, I don't click or tab into the next TextInput -- the window pops up just the one time... I do not have any FocusIn or FocusOut parameters set in that second TextInput, so I don't know why clicking or tabbing into that second TextInput would cause the problem... Anything else I should try? This is just ridiculous -- it *should* work, but for some reason focus keeps getting sent back to the first TextInput. I'm running Flex Builder 3.5a, and Flash Player 10,0,42,34. Thanks, L --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , valdhor valdhorlists@ wrote: Add the focusOut event listener when you get a focusIn on the text input. Then, when your focusOut event fires and you open the pop-up window, remove the focusOut event listener from the text input. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Laurence LMacNeill@ wrote: I want a pop-up window to appear when someone tabs out of a particular TextInput in my app. So I simply set its FocusOut event equal to the function that makes the pop-up window appear... Sounds simple enough, right? But the FocusOut event keeps occurring over and over... I type something into the TextInput then hit Tab. The pop-up window pops up the way it's supposed to. I select something in the pop-up window (or close it without selecting anything) and it pops right back up. It's like my TextInput is re-gaining focus and then losing it again (which makes the window pop-up, again, forcing me to select something or close the window, which makes it happen again, etc., etc) So how do I prevent this from happening? Why is FocusOut occurring over and over and over like that? I've tried, in my FocusOut handler, setting the focus onto another TextInput before calling the pop-up window, but that does no good -- same exact results. This is incredibly frustrating! Anyone have any ideas? Thanks, Laurence MacNeill Mableton, Georgia, USA -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: FocusOut event fires over and over...
Add the focusOut event listener when you get a focusIn on the text input. Then, when your focusOut event fires and you open the pop-up window, remove the focusOut event listener from the text input. --- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote: I want a pop-up window to appear when someone tabs out of a particular TextInput in my app. So I simply set its FocusOut event equal to the function that makes the pop-up window appear... Sounds simple enough, right? But the FocusOut event keeps occurring over and over... I type something into the TextInput then hit Tab. The pop-up window pops up the way it's supposed to. I select something in the pop-up window (or close it without selecting anything) and it pops right back up. It's like my TextInput is re-gaining focus and then losing it again (which makes the window pop-up, again, forcing me to select something or close the window, which makes it happen again, etc., etc) So how do I prevent this from happening? Why is FocusOut occurring over and over and over like that? I've tried, in my FocusOut handler, setting the focus onto another TextInput before calling the pop-up window, but that does no good -- same exact results. This is incredibly frustrating! Anyone have any ideas? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: FocusOut event fires over and over...
That doesn't seem to work either. Focus keeps returning to the original TextInput for some reason... I've even tried manually setting the focus to the next TextInput immediately after removing the FocusOut event listener on the first TextInput, before calling the pop-up window -- still doesn't work right; focus keeps going back to the first TextInput when the pop-up window closes. Now, if I click somewhere else on the screen -- in other words, I don't click or tab into the next TextInput -- the window pops up just the one time... I do not have any FocusIn or FocusOut parameters set in that second TextInput, so I don't know why clicking or tabbing into that second TextInput would cause the problem... Anything else I should try? This is just ridiculous -- it *should* work, but for some reason focus keeps getting sent back to the first TextInput. I'm running Flex Builder 3.5a, and Flash Player 10,0,42,34. Thanks, L --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: Add the focusOut event listener when you get a focusIn on the text input. Then, when your focusOut event fires and you open the pop-up window, remove the focusOut event listener from the text input. --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote: I want a pop-up window to appear when someone tabs out of a particular TextInput in my app. So I simply set its FocusOut event equal to the function that makes the pop-up window appear... Sounds simple enough, right? But the FocusOut event keeps occurring over and over... I type something into the TextInput then hit Tab. The pop-up window pops up the way it's supposed to. I select something in the pop-up window (or close it without selecting anything) and it pops right back up. It's like my TextInput is re-gaining focus and then losing it again (which makes the window pop-up, again, forcing me to select something or close the window, which makes it happen again, etc., etc) So how do I prevent this from happening? Why is FocusOut occurring over and over and over like that? I've tried, in my FocusOut handler, setting the focus onto another TextInput before calling the pop-up window, but that does no good -- same exact results. This is incredibly frustrating! Anyone have any ideas? Thanks, Laurence MacNeill Mableton, Georgia, USA