Ashish

The same problem happen, I remove the Deprecated proprieties but those erros still happen I'm pasting the sample code on email body.

thanks to feedback so sooner.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" height="652" initialize="dragIt">
        <mx:Script>
        <![CDATA[
        // Import the DragManager and DragSource classes.
        import mx.managers.DragManager;
        import mx.core.DragSource;

        // Handle the drag initialization for a mousedown event.
        function dragIt(event, text, format) {

            // Create an instance of DragSource.
            var ds:DragSource = new DragSource();

            ds.addData(text, format);
            DragManager.doDrag(event.target, ds, mx.containers.Canvas,                {backgroundColor:event.target.backgroundColor, width:30, height:30},                undefined, undefined, 30);
        }
        ]]>
        </mx:Script>

   
    <mx:Tile width="175">
        <mx:Canvas backgroundColor="#FF0000" borderStyle="solid" width="30"            height="30" mouseDown="dragIt(event, 'Red 1', 'red')">
            <mx:Label text="1" x="8" y="6" width="22" height="24"/>
        </mx:Canvas>
        <mx:Canvas backgroundColor="#FF0000" borderStyle="solid" width="30"            height="30" mouseDown="dragIt(event, 'Red 2', 'red')">
            <mx:Label text="2" x="8" y="6" width="22" height="24"/>
        </mx:Canvas>
        <mx:Canvas backgroundColor="#0000FF" borderStyle="solid" width="30"            height="30" mouseDown="dragIt(event, 'Blue 1', 'blue')">
            <mx:Label text="1" x="8" y="6" width="22" height="24"/>
        </mx:Canvas>
        <mx:Canvas backgroundColor="#0000FF" borderStyle="solid" width="30"            height="30" mouseDown="dragIt(event, 'Blue 2', 'blue')">
            <mx:Label text="2" x="8" y="6" width="22" height="24"/>
        </mx:Canvas>
        <mx:Canvas backgroundColor="#00FF00" borderStyle="solid" width="30"            height="30" mouseDown="dragIt(event, 'Green 1', 'green')">
            <mx:Label text="1" x="8" y="6" width="22" height="24"/>
        </mx:Canvas>
        <mx:Canvas backgroundColor="#00FF00" borderStyle="solid" width="30"            height="30" mouseDown="dragIt(event, 'Green 2', 'green')">
            <mx:Label text="2" x="8" y="6" width="22" height="24"/>
        </mx:Canvas>
    </mx:Tile>
    <mx:VBox>
        <mx:Label text="Drag red items into this list" />
        <mx:List dragEnter="doDragEnter(event, 'red')"
                 dragExit="doDragExit(event);"
                 dragOver="doDragOver(event);"
                 dragDrop="doDragDrop(event, 'firstList', ['red'])"
                 width="153"
                 height="20"
                 id="firstList"         />
        <mx:Label text="Drag blue items into this list" />
        <mx:List dragEnter="doDragEnter(event, 'blue')"
                 dragExit="doDragExit(event);"
                 dragOver="doDragOver(event);"
                 dragDrop="doDragDrop(event, 'secondList', ['blue'])"
                 width="153"
                 height="20"
                 id="secondList"         />
        <mx:Label text="Drag any items into this list" />
        <mx:List dragEnter="doDragEnter(event, 'any')"
                 dragExit="doDragExit(event);"
                 dragOver="doDragOver(event);"
                 dragDrop="doDragDrop(event, 'thirdList', ['red','blue','green'])"
                 width="152"
                 height="20"
                 id="thirdList"         />
    </mx:VBox>


</mx:Application>

2005/9/7, Ashish Goyal <[EMAIL PROTECTED]>:
widthFlex and heightFlex properties are deprecated so you are getting those warnings. You can use the syntax as shown in the warnings to get rid of the deprecation warnings.
 
From the error, it seems like you are calling doDragEnter method but its not defined anywhere. Let us know if you still getting errors after adding doDragEnter method.
 
-Ashish
 
 


From: [email protected] [mailto:[email protected]] On Behalf Of Igor Costa
Sent: Wednesday, September 07, 2005 4:34 PM
To: [email protected]
Subject: [flexcoders] Why Canvas don't work?

I trying to create some drag and drop with canvas but I recive theses errors alerts.

Warning /canvas.mxml:50 
Property mx.controls.List.widthFlex is deprecated.  Please use width='n%', where n is a number from 1 to 100.

Warning /canvas.mxml:50
Property mx.controls.List.heightFlex is deprecated.  Please use height='n%', where n is a number from 1 to 100.

Warning /canvas.mxml:58
Property mx.controls.List.widthFlex is deprecated.  Please use width='n%', where n is a number from 1 to 100.

Warning /canvas.mxml:58
Property mx.controls.List.heightFlex is deprecated.  Please use height='n%', where n is a number from 1 to 100.
Warning /canvas.mxml:66
Property mx.controls.List.widthFlex is deprecated.  Please use width='n%', where n is a number from 1 to 100.

Warning /canvas.mxml:66
Property mx.controls.List.heightFlex is deprecated. Please use height='n%', where n is a number from 1 to 100.

And an error on the method with the classes

Error
/canvas.mxml:44

There is no method with the name 'doDragEnter'



The part of code is below

<mx:Canvas backgroundColor="#FF0000" borderStyle="solid" width="30" height="30" mouseDown="dragIt(event, 'Red 1', 'red')">
Ashish
<mx:Label text="1" x="8" y="6" width="22" height="24"/>
</mx:Canvas>





--
Igor Costa
www.igorcosta.com






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS






--
Igor Costa
What's next?
www.igorcosta.com
www.mxstudio.com.br

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Software design and development Macromedia flex
Software development best practice


YAHOO! GROUPS LINKS




Reply via email to