DragAndDrop in packed Mochikit.js?

2 views
Skip to first unread message

djmuhl...@gmail.com

unread,
Aug 16, 2006, 11:02:24 AM8/16/06
to MochiKit
I checked out the latest trunk this morning (Revision 1074). I noticed
that the DragAndDrop.js is not being built into the packed version of
MochiKit.js. Is there a reason for this or is just not being done?

So then I manually included the DragAndDrop.js. In my test page, I got
the error:
d.makePositioned is not defined (DragAndDrop.js line 499). I thought
perhaps mixing the packed version of MochiKit.js was causing some
problem, so I edited the MochiKit.js file's SUBMODULES to include
"DragAndDrop", and then re-packed the script. I still got the same
error.

Anyhow, either I'm missing something or perhaps the DragAndDrop.js
isn't quite ready on trunk yet.

Suggestions?
Thanks
Dennis

Thomas Hervé

unread,
Aug 16, 2006, 11:55:03 AM8/16/06
to MochiKit
djmuhl...@gmail.com a écrit :

> I checked out the latest trunk this morning (Revision 1074). I noticed
> that the DragAndDrop.js is not being built into the packed version of
> MochiKit.js. Is there a reason for this or is just not being done?

Yes, D&D is still in developpement, so it's not put by default in the
packed version. Furthermore, due to its size, it may not be in the
packed version in the stable release.

> So then I manually included the DragAndDrop.js. In my test page, I got
> the error:
> d.makePositioned is not defined (DragAndDrop.js line 499).

You have to include New.js.

--
Thomas

djmuhl...@gmail.com

unread,
Aug 16, 2006, 12:06:38 PM8/16/06
to MochiKit

> You have to include New.js.

Ah ha... that did it for me. I'm dragging things all over now.

Thanks

rod...@gmail.com

unread,
Aug 19, 2006, 8:57:58 PM8/19/06
to MochiKit
Hello,

I'm definetly new to MochiKit, so pardon my ignorance if it comes out
in this post.

I am trying to play with the DragAndDrop and I was running into the
same issues as djmuhlestein. I included DragAndDrop.js by hand and then
New.js and now I'm getting:
Error: element has no properties
Source File: http://localhost/~rguzman/jsWin/MochiKit/New.js
Line: 32

I am using revision 1080 from the trunk.

Thomas Hervé

unread,
Aug 20, 2006, 12:53:06 PM8/20/06
to MochiKit
You should give a full example. My crystal ball feels rather dusty :).

--
Thomas

elRigo

unread,
Aug 20, 2006, 5:23:11 PM8/20/06
to MochiKit
haha Sorry! Since my crystal ball looks particularly shiny, I figured
everyone else's would, too. The example is below, but I'm not sure
it'll be any good any more, for I've found out two things: 1) the
error on line 32 of New.js did not affect the dragging, it worked just
fine even after the error occured. 2) The error went away sometime
when I wasn't looking! (had the js console closed). And now I can't
seem to reproduce it. I did update to rev 1081 while working on
something else, though. I will report if I see the error again,
though.

Alright, even if this is irrelevant now, this is what I had. It is
about as simple as one can make it, the relevant html is:

...
<script tpye="text/javascript" src="MochiKit/MochiKit.js">
<script tpye="text/javascript" src="MochiKit/DragAndDrop.js">
<script tpye="text/javascript" src="MochiKit/New.js">
<script type="text/javascript" src="dragTest.js">
...
<div class="draggable" id="1">
<p>Some stuff</p>
</div>

and dragTest.js:
connect(window, 'onload', function(){
new Draggable($('1') );
});

Captain Phalanx

unread,
Sep 8, 2006, 10:32:19 AM9/8/06
to MochiKit
Woei Google Groups rules :D

Got the same problem here...

I included New.js and it works.. :D

thnx all

Reply all
Reply to author
Forward
0 new messages