Hi Ashish:
I think you make a typo mistake in your code... The actual
implementation of Mochikit.DragAndDrop.Draggables is like....
MochiKit.DragAndDrop.Draggables = {
// register, other stuff...
}
MochiKit.DragAndDrop.Draggable = function() { /* ... */ }
MochiKit.DragAndDrop.Draggable.prototype = {
// __init__, etc...
}
NOTE: first one is Draggables (plural, see the final 's'), the other
class is singular: Draggable (not final 's' there). This is two
different class, one (Draggables) for manage the Draggables created in
your application (get reference counts, know when they are created,
destroyed... ) and Draggable, the class you instantiate to create your
objects. The idea is you don't use directly the Draggables classs, it's
just part of the support code of the framework.
Hope this helps.
Ashish Agrawal escribió:
> Thanks a million Bob for your reply. Now I issue with my code. But
> still one thing bothring me - how similar kind of code (The way I
> wrote) is working fine for MochiKit.DragAndDrop.Draggables?
>
> Actually, while creating ColorPicker, I took that code for reference.
> It also has same type of code flow
> 1st MochiKit.DragAndDrop.Draggables = { //Register and other stuff };
> 2nd MochiKit.DragAndDrop.Draggables = function(){};
> and finally MochiKit.DragAndDrop.Draggables.prototype = {};
>
> As I am newbie to JS, I followed the same :).
>
> anyway I am going to update ColorPicker code as you guided.
>
> Thanks
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" 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/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---