SenlyCamile
Topic Author
Posts: 11
Joined: 15 Jan 2021, 07:38

No TextBox CallBack

15 Jan 2021, 08:22

I run the "Samples.Login" with IOS,and add a "TouchUp" event callback to TextBox.But after touchdown the textbox,the callback method is not entered.
MainWindow::MainWindow()
{
	......
	Noesis::TextBox* userbox=FindName<Noesis::TextBox*>("UserBox");
	userbox->TouchUp()+=MakeDelegate(this,&MainWindow::boxTouchUp);
}
void MainWindow::boxTouchUp(Noesis::BaseComponent* sender, const Noesis::TouchEventArgs& e)
{
	.......
}
Last edited by SenlyCamile on 15 Jan 2021, 11:28, edited 1 time in total.
 
SenlyCamile
Topic Author
Posts: 11
Joined: 15 Jan 2021, 07:38

Re: No TextBox CallBack

15 Jan 2021, 11:26

Sorry,there is "TouchUp" event no callback,notTouchDown.
 
User avatar
sfernandez
Site Admin
Posts: 2058
Joined: 22 Dec 2011, 19:20

Re: No TextBox CallBack

15 Jan 2021, 13:23

Hi, there is an issue in our application framework (#1833) that is preventing TouchUp events to raise in the appropriate elements.

You can workaround that by disabling manipulations on the Window once loaded:
MainWindow::MainWindow()
{
    Initialized() += MakeDelegate(this, &MainWindow::OnInitialized);
    InitializeComponent();

    Loaded() += [this](BaseComponent*, const RoutedEventArgs&)
    {
        SetIsManipulationEnabled(false);
    };
}
On a side note, I guess it is a typo but FindName shouldn't have a pointer as template parameter, just the type:
Noesis::TextBox* userbox = FindName<Noesis::TextBox>("UserBox");
 
SenlyCamile
Topic Author
Posts: 11
Joined: 15 Jan 2021, 07:38

Re: No TextBox CallBack

16 Jan 2021, 09:27

Hi, there is an issue in our application framework (#1833) that is preventing TouchUp events to raise in the appropriate elements.

You can workaround that by disabling manipulations on the Window once loaded:
MainWindow::MainWindow()
{
    Initialized() += MakeDelegate(this, &MainWindow::OnInitialized);
    InitializeComponent();

    Loaded() += [this](BaseComponent*, const RoutedEventArgs&)
    {
        SetIsManipulationEnabled(false);
    };
}
On a side note, I guess it is a typo but FindName shouldn't have a pointer as template parameter, just the type:
Noesis::TextBox* userbox = FindName<Noesis::TextBox>("UserBox");
Thanks for your help,but now after "SetIsManipulationEnabled(false)", the box can't respond GotFocus or LostFocus.
Example:I touched textbox1,and the textbox1 GotFocus,then I touched passwordbox or textbox2,passwordbox and textbox2 are not GotFocus,and textbox1 is not LostFocus.
If I touch blank space after touch textbox1,then touch textbox2 or passwordbox,both can GotFocus after textbox1 LostFocus.
 
User avatar
sfernandez
Site Admin
Posts: 2058
Joined: 22 Dec 2011, 19:20

Re: No TextBox CallBack

18 Jan 2021, 16:18

Nothing wrong on your side, it seems there is a different issue (#1887). When handling TouchUp, Tapped or Holding events, next touch down events are not properly promoted to mouse down events, so controls are not correctly focused.

We'll fix it for the next release.

Who is online

Users browsing this forum: No registered users and 1 guest