Announcement

Collapse
No announcement yet.

[CLOSED] [#2923] [16.1] Javascript - Bridge - unable to init events with anonymous voids

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [CLOSED] [#2923] [16.1] Javascript - Bridge - unable to init events with anonymous voids

    So i was creating events, some times the events were null, so in initialized the events here is an example - it broke the JavaScript output. (only in the body of the class) - local variables are fine.

    https://deck.net/447c627e41d4552a3d412b739af061d3

    https://dotnetfiddle.net/9AcHEv
    Last edited by samuelgrahame; 2017-07-03 @ 11:28 PM.

    #2
    Thanks for letting us know about this issue.

    Can your sample just be simplified down to one EventHandler? Any particular reason why four of the same is required?

    Comment


      #3
      Issue #2923 has been created to track this defect. Please keep samples as simplified as possible.

      https://deck.net/2cd78768821a75e86728d64f979f7e92

      https://dotnetfiddle.net/E8Fdt7

      using System;
      
      public class Program
      {
          public static event EventHandler Test = new EventHandler((sender, e) => { });
      
          public static void Main()
          {        
              Test += (sender, ev) =>
              {
                   Console.WriteLine("Test");
              };
      
              InvokeEvent();
          }
      
          public static void InvokeEvent()
          {
              Test(null, EventArgs.Empty);
          }
      }

      Comment


        #4
        Yeah sorry, Will do next time. Thank you

        Comment


          #5
          Fix for issue #2923 merged into v16.1 branch and will be included in the next Bridge.NET release.

          Comment

          Working...
          X