Announcement

Collapse
No announcement yet.

porting from Bridge.Net 15 to 17

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

    porting from Bridge.Net 15 to 17

    I am working on a project build with Bridge.Html5, Version=15.7.0.0.
    Now I use Bridge.Html5 Version=17.10.0.0 and got problem with comparing Union:

    Example:
     
    if(panel.Style.Display == Display.Block)
     {
        panel.Style.Display = Display.None;
     }
    Error CS0019 Operator '==' cannot be applied to operands of type 'Union<string, Display>' and 'Display'

    What is preferred way to solve this?

    (panel.Style.Display was in version 15 just enum in 17 its a Union?)





    #2
    In Deck.Net:

    public class Program
    {
        public static void Main()
        {
            HTMLElement e= new HTMLDivElement();
            var test = e.Style.Visibility;
            var test2 = Visibility.Hidden;
            bool isSame =  test == test2;
    
    
    
        }
    }

    Comment


      #3
      Hi guidovanhils,

      Can you try with the .Equals method as a temporary work-around?

      https://deck.net/b93e3872734e8b982b6e1f1499ef2060

      public class Program
      {
          public static void Main()
          {
              HTMLElement e= new HTMLDivElement();
              var test = e.Style.Visibility;
              Console.WriteLine("test: " + test);
      
              var test2 = Visibility.Hidden;
              Console.WriteLine("test2: " + test2);
      
              bool isSame =  test.Equals(test2);
              Console.WriteLine("isSame: " + isSame);
          }
      }
      We will investigate why == is not working.

      Comment


        #4
        Thanks for feedback.
        Last edited by guidovanhils; 2020-06-26 @ 10:44 AM.

        Comment

        Working...
        X