Dragging Errors in 7.10

Dragging Errors in 7.10

Postby nageswaragunupudi » Fri Oct 12, 2007 7: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:
Code: Select all  Expand view
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 :-
Code: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10622
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Antonio Linares » Fri Oct 12, 2007 9:46 am

This is the right fix:
Code: Select all  Expand view
         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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 46 guests