in base/basewindow.lzx, I moved the setDragPos method to be outside of
the state, given that we will
be phasing out support for methods inside of states.




        <state name="_windowDrag">
            <attribute name="starty" value="$once{this.y}"/>
            <attribute name="startx" value="$once{this.x}"/>
            <attribute name="ydoffset" value="this.getMouse( 'y' )"
when="once" />
            <attribute name="xdoffset" value="this.getMouse( 'x' )"
when="once" />
            <attribute name="y"
                       value="${setDragPos('y',
this.immediateparent.getMouse( 'y' ))}"/>
            <attribute name="x"
                       value="${setDragPos('x',
this.immediateparent.getMouse( 'x' ))}"/>
        </state>

        <method name="setDragPos" args="xory, mousepos">   <![CDATA[
            var newpos = mousepos - this[xory + 'doffset'];
            var diff = this[xory] - this['start' + xory];
            if (Math.abs(diff) > 3) {
                setAttribute('state', 3);
            }
            return newpos;
            ]]>
        </method>

-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to