Question this

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marcel Molenaar

    #1

    Question this

    What does this mean:

    element.multi_s elector = this;

    I is used in this javascript class:


    I understand that this line is adding a reference to the object but can
    someone explain me why this is important and what is it used for?

    Marcel


  • -Lost

    #2
    Re: Question this

    Marcel Molenaar wrote:
    What does this mean:
    >
    element.multi_s elector = this;
    >
    I is used in this javascript class:

    >
    I understand that this line is adding a reference to the object but can
    someone explain me why this is important and what is it used for?
    >
    Marcel
    >
    >
    Alright I am going to venture out on a limb on this one, but I think it
    has something to do with closures.

    Or just in general having a spare to insert when 'this' is no longer in
    scope with the object you may be wanting.

    Then again my understanding of closures is about 20%.

    --
    -Lost
    Remove the extra words to reply by e-mail. Don't e-mail me. I am
    kidding. No I am not.

    Comment

    • Marcel Molenaar

      #3
      Re: Question this


      "-Lost" <maventheextraw ords@techie.com wrote in message
      news:Hv6dnXdQ6u DtZ7HbnZ2dnUVZ_ oCmnZ2d@comcast .com...
      Marcel Molenaar wrote:
      >What does this mean:
      >>
      >element.multi_ selector = this;
      >>
      >I is used in this javascript class:
      >http://the-stickman.com/web-developm...-file-element/
      >>
      >I understand that this line is adding a reference to the object but can
      >someone explain me why this is important and what is it used for?
      >>
      >Marcel
      >
      Alright I am going to venture out on a limb on this one, but I think it
      has something to do with closures.
      >
      Or just in general having a spare to insert when 'this' is no longer in
      scope with the object you may be wanting.
      >
      Then again my understanding of closures is about 20%.
      >
      --
      Ok thanks, i understand your explanation but can you give me an example or
      further explanation?

      The file in which this is used can be downloaded from
      http://the-stickman.com/files/multiple-file-element.zip and it is used in
      the file multifile.js at line 68

      Marcel


      Comment

      Working...