facebook

OO Javascript / Bad outline

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #212295 Reply

    posttool
    Member

    Hi
    It would be nice if the outline recognized OO JS.
    Try this in your editor:

    function FormButton(name) {
        this.name = name;
        this.mc = document.getElementById("button_"+name);
        this.active = false;
        this.normal();
    }
    FormButton.prototype.hilight = function (name) {
        if (this.mc==null) return;
        if (this.active) {
              this.mc.style.background = "#dff0ff";
              this.mc.style.color = "#1e88bf";
          }
    }
    FormButton.prototype.normal = function (name) {
        if (this.mc==null) return;
        if (this.active) {
              this.mc.style.background = "#eff8ff";
              this.mc.style.color = "#1e88bf";
              this.mc.style.cursor = "pointer";
          } else {
              this.mc.style.background = "#f0f0f0";
              this.mc.style.color = "d0d0d0";
              this.mc.style.cursor = "arrow";
          }
    }
    FormButton.prototype.setActive = function (active) {
        this.active = active;
        this.normal();
    }
    #212319 Reply

    Riyad Kalla
    Member

    I’ve never seen this… do you have a link to the spec?

    #212331 Reply

    posttool
    Member

    http://www.ecma-international.org/publications/standards/Ecma-262.htm

    Its a 4 year old spec, but not terribly popular. Most JS developers are
    function oriented. This type of object representation also works in Flash 6

    I haven’t studied the spec it but it looks like 15.2 & 15.3 are where
    prototype is specified… david

    #212338 Reply

    Riyad Kalla
    Member

    Wow, thanks David. I can’t promise anything on this but I’ll send it along.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: OO Javascript / Bad outline

You must be logged in to post in the forum log in