Error #2025

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/getChildIndex()
at mx.managers::SystemManager/getChildIndex()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\SystemManager.as:1829]
at mx.managers.systemClasses::ActiveWindowManager/mouseDownHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\systemClasses\ActiveWindowManager.as:471]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\UIComponent.as:13128]
at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\SystemManager.as:2924]

I'm afraid I don't use flex, but I've got a few thoughts that
might help you to figure it out:

1) It looks to me like something that is not a DisplayObject, or
is not added to the stage, is being indexed on a
DisplayObjectContainer.

2) This is happening in response to your mouse event.

You'd probably figured that much out...

So - what's going on in that PrepModelCommand? Is it possible
that somewhere you've got something being fired with a faulty
'clone' method, so that the clone function returns a MouseEvent
when it should be a ModelEvent or similar?

What does ApplicationStartedSignal extend? Is it a pure Signal
or a NativeSignal?

I dident need it since the main class extends the application. I
guess this messed it up. And properbly have something to do with
what you wrote in 1). Something there was added thats was not a
DisplayObject but an application.