Main Site Documentation

MessageBox Issue


#1

Hi! I have added a button with the following code:

#region Close
static void InitClose()
{
	// Get the Button
	Button Close = (Button)window.GetChildByName("close");

	// Listen for tap events
	Close.TapEvent += new OnTap(Close_TapEvent);
}

// Handle tap events
static void Close_TapEvent(object sender)
{
	ModalResult result = Glide.MessageBoxManager.Show("Do you want to save settings?", "Closing...", ModalButtons.YesNo); //Yes == 6; No == 7
	Debug.Print("Result: " + result.ToString());
}
 #endregion

The problem is that if I press “Yes” the keyboard dialog is opened and saved in this other control:

#region colatime
static void Initcolatime()
{
	// Get the colatime
	TextBox colatime = (TextBox)window.GetChildByName("colatime");

	// Add a tap event handler to open the keyboard.
	colatime.TapEvent += new OnTap(Glide.OpenKeyboard);

	// Add a value changed handler.
	colatime.ValueChangedEvent += new OnValueChanged(colatime_ValueChangedEvent);
}

// Print out the new value.
static void colatime_ValueChangedEvent(object sender)
{
	TextBox colatime = (TextBox)window.GetChildByName("colatime");
	Debug.Print(colatime.Text);
}
 #endregion

Any idea about why is this happening??

Thanks!!


#2

This is probably related to this issue

http://www.tinyclr.com/forum/22/5022/