Never mind!  A little confused, but none the less I solved the
problem.  I needed to bind the object like this:
 _sessionGrid.addEventListener('cellclick',_sess.show.bind(_sess));


On Sep 12, 11:18 am, kstubs <[email protected]> wrote:
> I'm extending a class with the below module.  I'm expecting
> this.Session available to the class but it is not, it loses scope.  Do
> I have to define this.Session in the original class?
>
> My class definition:
> var _sess = new Class.create(msoMeet, {});
>
> Extending _sess:
> Object.extend(_sess,SessionEdits);
>
> My module definition:
> var SessionEdits = {
>     show: function(e)
>     {
>         var sessid = e.element().up().readAttribute('title');
>         var result = this.Session.result.row.find(function(s) {
>             return s.sessid == sessid;
>         });
>         alert(result);
>         $('SESSION_EDIT_CONTAINER').show();
>     },
>     loadSessions: function(json)
>     {
>         this.Session = json;
>     }
>
>
>
> }

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to