Uploaded image for project: 'Appcelerator Studio'
  1. Appcelerator Studio
  2. TISTUD-6697

Studio doesn't recognize Javascript property accessors in object prototype

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Editor
    • Labels:

      Description

      Try copying this into Studio:

      Example.js

      var some_object = {
          get foo() {
              return this._foo;
          },
          set foo(val) {
              this._foo = "Foo was set to " + val;
          }
      };
       
      alert("some_object.foo = " + some_object.foo);
      some_object.foo = "bar";
      alert("some_object.foo = " + some_object.foo);
      

      You will see errors all over the declaration of some_object. However, if you run this code on any platform, it works just fine. Studio just doesn't recognize this method of creating properties on a prototype. That means every time I go to run or debug my app containing this kind of code, Studio claims there are errors where there are none.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ingo Ingo Muschenetz
                Reporter:
                arkainrdk Ranando King
              • Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: