I am using Rico for a DragAndDrop application. It worked fine with Rico
1.1. Because of using Scriptaculous I have to update to prototype 1.6
and therefore to update to Rico 2.0. Now I have problems.
I am using the actual Firefox 2.0.0.11.
I include prototype and rico:
<script type="text/javascript"
src="javascritpt/prototype/prototype.js"></script>
<script type="text/javascript" src="javascritpt/rico/rico.js"></script>
In the onLoad-event of the document I put the following command:
Rico.loadModule('DragAndDrop');
to add the needed module for DragAndDrop.
To initalize the DragAndDrop function I use the following code:
for(i=1;i<=listSpieler[0].spieler.length;i++)
dndMgr.registerDraggable(new Rico.Draggable('spieler'+i,'s'+i));
dndMgr.registerDropZone(new Rico.Dropzone('Einsatz'));
dndMgr.registerDropZone(new Rico.Dropzone('Liste'));
When I am now trying to do a DragAndDrop I got the following error
message (in Firebug):
Rico.Color has no properties
Do somebody know the reason or what I did wrong?
on 25.01.2008 10:59
on 26.01.2008 14:02
You found a bug. "Rico.loadModule('DragAndDrop');" does not load all of
code that is truly needed for drag-and-drop. To work around it, instead
use:
Rico.loadModule('DragAndDrop','Color');
This will be fixed in the next Rico release.
Matt
on 27.01.2008 15:23
Neverthelees it doesn't work. The error message is the same: Rico.Color has no properties var color = Rico.Color.createColorFromBackground(htmlElement); ricoDragDrop.js (line 421)
on 27.01.2008 16:37
What if you reverse them?
Rico.loadModule('Color','DragAndDrop');
on 29.01.2008 07:23
I tried it also in the reverse way - but it still does not work. Do you have any other idea?
on 06.02.2008 09:27
For all who are interested in the solution. I found it:
Rico.loadModule('Corner','DragAndDrop');
After reading all javascript, I fount, that in ricoStyles.js the class
Rico.Color is defined and that javascript-file is loaded with the module
Corner.
on 14.03.2008 10:26
Hi, I have a set of images that can be dropped on different drop zones. Now I'd need the ordering to be returned as an Array but don't know how to accomplish that. In a perfect world I'd have a function tellOrderingOfDropZoneX(), which, when executed would return an array like this ['image05', 'image203', 'image22', 'image49', etc.] Any help on how to get the ordering of objects that were dropped on a drop zone, would be greatly appreciated. Thanks in advance!


