Hi,
i have experienced strange behaviour with a touchhandler getting focus out of a modal view
im currently using embedded wizzard 9.00
In a menu, there are two buttons (open and close) that have set the RetargetCondition to "Core::RetargetReason[]", so an empty value. Reason for this configuration: These Buttons are there to control a motor that moves the device where the touchscreen is attached. Since the Button is so small, it is easy to move the finger out of the perimeters of the Button and thus stop the motion. Making the button bigger isn't discussable from design perspectives. When ignoring the "OnLeave" singal, the drive does not stop to run, but when swiping around and hitting the area of another touch-handler, the functionality of this handler gets additionally fired. So I disabled the Retarget-functionality, sothat swiping away from the button does not trigger any other touchhandler. When lifting the finger anywhere on the display, the touchhandler gets notified and stops the drive correctly.
My Problem: A modal view is opened on top of the menu-view. When swiping the knob of a horizontal slider, the drive-button grabs the touch-action away from the touchhandler in the modal view and fires its signals when the finger is in the buttons area. thus the drive starts to move... simply tapping the area without sliding into the area does not fire anything...
I thought, that when making a view modal, all the other views are not able to catch any touch-event.
the menu-view is NOT modal. when touching an item out of the menubar, a "panel" is opened modal with the configuration-details of the item.
the menu view:
the modal "panel":
now, when sliding the right horizontal slider to increase brightness, once coming in the vicinity of the underlying "close"-button, the button gets fired. Sliding with the finger away from the position doesn't change the behaviour.
The action, opening the panel looks like so:
// create a new instance of the view/core::group
var Slider::PanelColorSlider panel = new Slider::PanelColorSlider;
// do some configuration
panel.property = value;
// get root obj
var Core::Root root = GetRoot();
// add the view to the application
root.Add(panel, 0);
// make it modal
root.BeginModal(panel);
How can i prevent the drive-buttons to fire? I think it has to do with the retarget settings of the other touch-handlers. But all in all, i think this is unexpected behaviour...
For a better understanding, another image with the movement of the finger depicted:
greetings Daniel