Forum Discussion

selina's avatar
selina
Occasional Contributor
8 years ago

FireEvent in Flex Combobox

There is Flex Combobox in my app with Children objects Edit and ListItems. I can use Combobox.ClickItem to select the item I want, But it cannot fire event on change to trigger my page get data. So I simulate Keys and Mouses actions like below, but it still cannot trigger event. Anyone has ideas?  If I click use real mouse,the event can be trigger. It's weird.

 

softwareIDEdit.Click
mockDDIPage.Keys "^a"
mockDDIPage.Keys "[Del]"
mockDDIPage.Keys(softwareID)
mockDDIPage.Keys "[Enter]"
call softwareIDEdit.DblClick(140, 13)

 

2 Replies

  • Speak to your devs.

     

    You need to find out what the event trigger is.

     

    It could be field exit (try tabbing out of the active control after making your selection). That's the obvious one.

     

    Or they could have a custom trigger attached to another object (invisible overlay, higher level object, lower level one, relative screen co-ordinates .... who knows!) in the application.

     

    I have a similar thing with a Tree View with checkboxes. You can click a node. But clicking the checkbox triggers custom propagation up and down the tree, dependent on the layer you selected within. But the event trigger looks for a click on the actual tree, not on the node, because that's how they chose to write it. So I need to re-map the node co-ordinates to apply to the tree object and apply the click to that. No WAY I would have worked it out without dev input.

     

    This is not to say this will work for you. It's merely an example.

     

    But only the devs will know how they have implemented their event triggers. We can't tell that.

    • selina's avatar
      selina
      Occasional Contributor

      Solved this problem by change the order as below. Press Enter after click the drop down button


      call softwareIDEdit.DblClick(140, 13)

      mockDDIPage.Keys "[Enter]"