benbjohnson / melomel

External ActionScript Interface.
https://github.com/benbjohnson/melomel/wiki
Other
42 stars 8 forks source link

Melomel can't find pop up window. #8

Closed Nek closed 14 years ago

Nek commented 14 years ago

It won't do it 'cause all the pop ups of flex application has systemManager as their parent not the topLevelApplication.

Here is how I've made it work without modifying the library:

comp = Melomel.find("com.ghcg.quasar.view.components.AccountsPage")
#this is one of my custom components
comp.should_not be_nil
comp.systemManager.should_not be_nil
window = Melomel.find("spark.components.TitleWindow", comp.systemManager, :title => "My Window")
window.should_not be_nil

I'm pretty sure Melomel also won't be able to find ToolTip objects, and cursors. They are also inside of systemManager.

Nek commented 14 years ago

And of course it won't find any of the components inside of pop up window.

benbjohnson commented 14 years ago

I'll change it so that Melomel searched from the stage by default instead of the application.

Nek commented 14 years ago

Thanks, Ben! I was trying to fix it myself and missed this obvious solution.

benbjohnson commented 14 years ago

It's fixed. You can find the change in the v0.4.1 SWC on GitHub.