FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Dragging Errors in 7.10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Dragging Errors in 7.10
Posted: Fri Oct 12, 2007 07:59 AM
In version 7.10 using :bDragBegin is giving errors and not working. As an example, we may try TestDrp3.Prg in fwh\samples folder. We get the following runtime error:
Application
===========
   Path and name: C:\FWH\SAMPLES\TESTDRP3.Exe (32 bits)
   Size: 1,283,584 bytes
   Time from start: 0 hours 0 mins 2 secs 
   Error occurred at: 10/12/07, 13:22:33
   Error description: Error BASE/1004  Class: 'NIL' has no exported method: EVAL
   Args:
     [   1] = U   
     [   2] = N   19
     [   3] = N   110
     [   4] = N   1
     [   5] = L   .T.

Stack Calls
===========
   Called from:  => EVAL(0)
   Called from: CONTROL.PRG => TCONTROL:MOUSEMOVE(0)
   Called from: BUTTON.PRG => (b)TBUTTON:TBUTTON(0)
   Called from:  => TBUTTON:MOUSEMOVE(0)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: CONTROL.PRG => TBUTTON:HANDLEEVENT(0)
   Called from: WINDOW.PRG => _FWH(0)
   Called from:  => WINRUN(0)
   Called from: WINDOW.PRG => TWINDOW:ACTIVATE(0)
   Called from: TESTDRP3.PRG => MAIN(38)


This is happening because of the 2 new lines of code inserted in the MouseMove method of Control.Prg in version 7.10. The error is occuring at line 629, because ::bMMoved is NIL :-
628:         else
629:            Eval( ::bMMoved, nRow, nCol, nKeyFlags, .T. )   
630:         endif

I do not know the purpose of introducing the two new lines but if we change "else" in line 628 to "elseif VALTYPE(::bMMoved) == 'B'", all code using drag and drop is working fine. I do not know if my proposed change will create any other side effects but for the time being I am able to make my present software work with the above small change.

I would be grateful if Mr. Antonio can look into this and advise.
Regards



G. N. Rao.

Hyderabad, India
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dragging Errors in 7.10
Posted: Fri Oct 12, 2007 09:46 AM
This is the right fix:
         if ! lDragging
            ::DragBegin( nRow, nCol, nKeyFlags )
         else
            if ValType( ::bMMoved ) == "B"
               Eval( ::bMMoved, nRow, nCol, nKeyFlags, .T. )   
            endif   
         endif

Many thanks for your feedback :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion