Turns out this error was occuring because name of the focusManager variable in the focusOnInput() function was clashing with the mx.core.UIComponent.focusManager property. So the problem was resolved by renaming the variable.
--- In flexcoders@yahoogroups.com, "n51red" <[EMAIL PROTECTED]> wrote: > > Hello, > > After migrating an application from f2b3 to the final release of Flex > 2 a new problem has emerged involving the FocusManager. > > I use a FocusManager to focus on a TextInput when its parent becomes > visible. The text input does indeed take the focus and the component > responds to the keyboard without any problems. After this, however, > all mouse clicks in the application give the following error: > > ArgumentError: Error #2025: The supplied DisplayObject must be a > child of the caller. > at flash.display::DisplayObjectContainer/getChildIndex() > at mx.managers::SystemManager/getChildIndex() > at mx.managers::SystemManager/::mouseDownHandler() > > If I click "continue" in the error dialogue the same thing happens > when I next click the mouse. > However, if I click "dismiss all" the problem goes away altogether > and the application responds to clicks as it should. > > After experimenting it appears to be the instantiation of the > FocusManager instance rather than calling its setFocus method that > causes the problem. > > His is the function I call in response to show events on my component: > > private function focusOnInput():void > { > var focusManager:FocusManager=new FocusManager(this); > focusManager.setFocus(searchTextInput); > } > > Does any one know what's going on here or what I might be able to do > about it? > > Thanks, > N51 > ------------------------ Yahoo! Groups Sponsor --------------------~--> Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/