Bugs item #455260, was opened at 2001-08-25 06:15
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105757&aid=455260&group_id=5757

Category: DynAPI 2 API
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ole Mose (olemose)
Assigned to: Nobody/Anonymous (nobody)
Summary: Probems with dragging

Initial Comment:
I get an error, when im using the DynAPI samples about 
dragging.
Im trying this code:

HTML and other...
<script language="Javascript" 
src="../dynapi/src/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('../dynapi/src/lib/');
DynAPI.include('dynapi.api.*');
DynAPI.include('dynapi.event.*');
</script>
<script language="Javascript">
DynAPI.onLoad=function(){
        myLayer=new DynLayer
(null,100,100,100,100,'#c0c0c0')
        DragEvent.setDragBoundary(myLayer)
        DragEvent.enableDragEvents(myLayer)
        DynAPI.document.addChild(myLayer)
...
Then i get a runtime error, (p is not an object) 
whitch points to line 153 in DragEvents.js.

DragEvent.getSrcParent=function(f) {
        for (var p=f.parent;p.parent;p=p.parent)
                if (p.isDynDocument) return p;
        return false;
}
It the middle expression p.parent in the for-
expression that causes the problem.
Its the same in IE5.5, NS47 and NS6.
Im using DynAPI 2.55


----------------------------------------------------------------------

Comment By: Alain Chesnais (chesnais)
Date: 2001-10-22 11:48

Message:
Logged In: YES 
user_id=328532

I ran into a similar problem, but worked around it by 
calling DragEvent.enableDragEvents after the adding the 
layer to its parent with an addChild call. The problem was 
that the code was looking for the parent but it hadn't been 
assigned at the time the call to enableDragEvents was made.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105757&aid=455260&group_id=5757

_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[email protected]/

Reply via email to