picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.57k stars 325 forks source link

[MAC] Shown event won't fire for Dialog when called via the ShowModalAsync call #2254

Open VPKSoft opened 2 years ago

VPKSoft commented 2 years ago

Hi, I don't seem to get the ShowModalAsync call to fire the Shown event on macOS.

Expected Behavior

A NotImplementedException is thrown.

Actual Behavior

Nothing happens.

Steps to Reproduce the Problem

  1. Use the sample code for the dialog.
  2. Call the await new TestDialog().ShowModalAsync(this); from another control or form.

Code that Demonstrates the Problem

using Eto.Forms;
namespace amp.EtoForms.Forms
{
    public class TestDialog: Dialog
    {
        public TestDialog()
        {
            Shown += TestDialog_Shown;
        }

        private void TestDialog_Shown(object? sender, EventArgs e)
        {
            throw new NotImplementedException();
        }
    }
}

Specifications

This is not urgent in any way - just thought to report the issue.

Ps. Thanks for the great framework šŸ‘šŸ» I have started porting my OSS WinForms projects to Eto.

cwensley commented 2 years ago

Thanks for reporting the issue! In looking at the code this was certainly an oversight when changing some things around.