Saving scope

Saving scope

gordingingordingin Posts: 1Questions: 0Answers: 0
edited March 2012 in General
I had to move my code from a Revealing Module Pattern to a Revealing Prototype Pattern but now my this pointer is more difficult to deal with. I need to get a local var after a call back to the server to use in my fnRender method but now my this object points to my function, not my class. Is there a way I can pass the this object to dataTable so I can get it back during the fnRender method?

thx
Ralph

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Hmm - I guess you have one instance of the class per row? You could use 1.9.1.dev (will soon be released as 1.9.1) and pass in your instances as part of the data object for each row (the reason I say to use 1.9.1.dev is that it doesn't clone the object, while 1.9.0- does). Then your instance will be available in the data object for the row.

    Allan
This discussion has been closed.