Main Site Documentation

MessageBoxManager issue


#1

I go from a ‘view’ window to an ‘edit’ window. On the ‘edit’ window, there is a ‘Save’ button that is wired up like this:

    networkChangeWindow.GetChildByName("saveButton").TapEvent += new OnTap(delegate
    {
        if (Glide.MessageBoxManager.Show("Settings have been saved!", "Settings Saved", DialogButtons.Ok) == DialogResult.Ok)
        {
            networkChangeWindow.Invalidate();
            Tween.SlideWindow(networkChangeWindow, networkStatusWindow, Direction.Left);
        }
    });

The messagebox shows correctly, and brings me back to the ‘view’ page. However, when I go BACK to the ‘edit’ page (using Tween.Slide) - the messagebox is still there, and this time the OK button doesn’t do anything.

How do I get the message box to “go away” once I navigate away from that window??


#2

What version of Glide are you using?


#3

Assembly properties shows 0.1.0.0 - I just downloaded it a couple of days ago, so I believe the latest.


#4

This is a bug that will be fixed.


#5

Oh ok - any workaround for now?? Thanks!


#6
networkChangeWindow.GetChildByName("saveButton").TapEvent += new OnTap(delegate
{
	if (Glide.MessageBoxManager.Show("Settings have been saved!", "Settings Saved", DialogButtons.Ok) == DialogResult.Ok)
	{
		Thread.Sleep(100);
		networkChangeWindow.Invalidate();
		Tween.SlideWindow(networkChangeWindow, networkStatusWindow, Direction.Left);
	}
});

#7

That did it, thanks!! :slight_smile: