Copy link to clipboard
Copied
Hello,
I got this problem:
1. objectA in containerA and objectB in containerB
2. objectB has mouseOver listener, which shows toolTip with calculated number of objects in containerB
3. I move objectA to containerB with drag&drop. Now I have two situations depending on when I release objectA from drag:
3a. While having objectA under mouse cursor (it's still during drag operation) I move mouse over objectB and after a while I see toolTip showing "1 object".
I drop objectA and I programatically change the "ToolTipManager.currentToolTip.text" property to show "2 objects". And it works fine.
3b. While having objectA under mouse cursor (it's still during drag operation) I move mouse over objectB and drop objectA at once. The toolTip doesn't have time to show anything. But after a while (I still have mouse over objectB) I see toolTip showing "1 object". I have to move the mouse out and over again to see "2 objects".
Situation in 3b occurs because when I move objectA over objectB it catches mouseOver event and prepares text with "1 object". But this time during drop operation I cannot change the "ToolTipManager.currentToolTip.text" property because when I drop the item there is no toolTip to edit, "ToolTipManager.currentToolTip = null".
And since the mouse is still over the objectB it's still going to show "1 object" which was prepared earlier.
I've tried to use bindable variable as toolTip text in step 2. but it doesn't work.
So I have no more ideas how to force the text change in situation 3b. Any help would be appreaciated
Copy link to clipboard
Copied
update your text immediately when an object is dropped
Copy link to clipboard
Copied
Thanks kglad,
I can't update text because there is no toolTip to update at the time of dropping the object.
Copy link to clipboard
Copied
then use a variable to store the what you want to display.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now