Can I dispatch an event from the skin and have the hostcomponent listen it? I have a text input and an info icon in frnt of it, I want to show the tooltip of the textinput when there is a rollover event on the icon. I wrote a skin with the textinput and icon and in the rollover event on the icon I am dispatching an event and added an event listener to the hostcomponent of the skin. It seems like hostcomponent is not listening the event.
My skin handles all the animation logic and contains the image and the textinput,and then I am extending the skinnable component class with the two skin parts and controlling the skin states from there. In the rollover event I dispatched an event which host omponent is supposed to catch and do the following:
myTextInput. tooltip = _toolTip
_toolTip is in the construcotr of the hostcomponent.
What is wrong in what I did? Why is my host component not receiving a event from the skin?
Can you post the code here?(where you are dispatchign the event and where you are catching the event ) , mostly check the 'bubbles' property on the dispatchEvent method, it is by default set to false if it is a custom event, set it to true.
Thanks for your reply. My code is kinda long and apparently I can't copy paste in this window(not sure why).
Is there any way to attach the code somehow?
probably paste only the pieces that does the job of handling the events and dispatching the events, everything is not requierd.