onDrop : handleDrop.bind(this);

..

handleDrop : function(e){
      this.setDragItem(...);
}

http://prototypejs.org/api/function/bind

On Oct 27, 2:24 pm, Kris S <[EMAIL PROTECTED]> wrote:
> When creating behavior classes using lowpro, how can i reference the
> parent class while in a child class/obj. If you look at the code below
> it should be clear.  Basically I want to trigger a method after the
> drop event is fired.
>
> thumbClickPreview=Behavior.create({
>         initialize: function(obj) {
>         },
>         onmousedown:function(e){
>                         this.onclick = new Draggable(e.target,
> {revert:true});
>                         Droppables.add('url',{
>                                 accept:this.element.down().id,
>                                 hoverclass: 'hover',
>                                 onDrop: function(e){
>                                         $('url').highlight();
>                                         $('message').insert({top:
> e.src });
>                                         // WHILE IN THIS MESSAGE
>                                         // HOW DO I REFRENCE
> thumbClickPreview's method's?
>
> thumbClickPreview.setDragItem(false);
>
>                                 }
>                         });
>         },
>         onclick: function(e){
>                 thumbClickPreview.setDragItem(true);
>         },
>         setDragItem:function(trigger){
>                 if(trigger) $('preview-img').src =
> this.element.down().src
>         }
--~--~---------~--~----~------------~-------~--~----~
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 prototype-scriptaculous@googlegroups.com
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