Announcement

Collapse
No announcement yet.

What class represents a simple JavaScript Object?

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

    What class represents a simple JavaScript Object?

    Is it just the BCL Object?

    #2
    Well, yes. Can you elobarate what exactly do you want to know? Or may be you can describe your issue?

    Comment


      #3
      Maybe use of the [ObjectLiteral] Attribute would help for your scenario:

      http://live.bridge.net/#51f5db4efcc98d229bf7

      Example (C#)

      public class App
      {
          [Ready]
          public static void Main()
          {
              var person = new Person { Name = "Frank" };
          }
      }
      
      [ObjectLiteral]
      public class Person
      {
          public string Name { get; set; }
      }
      Example (JS)

      Bridge.define('Demo.App', {
          statics: {
              config: {
                  init: function () {
                      Bridge.ready(this.main);
                  }
              },
              main: function () {
                  var person = { name: "Frank" };
              }
          }
      });
      Last edited by geoffrey.mcgill; 2016-03-15 @ 06:02 PM.

      Comment


        #4
        I realize this question was basically a different version of http://forums.bridge.net/forum/commu...y-json-objects

        But thank you Geoffrey for giving a more elaborate version of how to use ObjectLiteral!

        Comment

        Working...
        X