Solved -- seems I was missing a .bind() earlier
in my call chain.

 - Mike

On Jan 26, 3:52 pm, Mike <[email protected]> wrote:
> This is some working code that makes a Draggable:
>
>   this.draggable = new Draggable(ts.up("div.rsrcRow"), {
>       revert: true,
>       ghosting: true,
>
>       onStart: function(draggable, event) {
>         var G = window.grid;
>         var dzs = G.gridElt.select("div.rsrcRow");
>         G.dropZoneElts = dzs;
>
>         // But why doesn't this store window.grid ?
>         G.shouldBeGridObj = this;   // ? But IS draggable.options.
>       }.bind(window.grid),
>   ...
>   });
>
> I would think the value of 'onStart' here would be the
> wrapper that bind puts around the function object, but
> it clearly is not.
>
> window.grid is a prototypejs-style object, and when
> onStart is called, 'this' is bound not to that object,
> but to draggable.options.  And looking at it after
> the drag+drop (as window.grid.shouldBeGridObj) I can
> see that the 'onStart' member is the original function body
> with no indication of a bind-wrapper.
>
> What am I missing here?
>
> TIA,
>
> Mike
--~--~---------~--~----~------------~-------~--~----~
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