new and important bug in FW 11.11

new and important bug in FW 11.11

Postby ukservice » Tue Dec 20, 2011 9:01 pm

Hello,

In samples\testget.prg.

In second get, Number.

Paste a test.

Code: Select all  Expand view  RUN
  Error occurred at: 12/20/2011, 22:01:25
   Error description: Error BASE/1111  Argument error: LEN
   Args:
     [   1] = N   0.00

Stack Calls
===========
   Called from:  => LEN( 0 )
   Called from: .\source\classes\TGET.PRG => TGET:HANDLEEVENT( 552 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3160 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 266 )
   Called from: testget.prg => MAIN( 30 )
 



Thanks.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: new and important bug in FW 11.11

Postby Antonio Linares » Tue Dec 20, 2011 9:52 pm

John,

This change is required in Class TGet:

Code: Select all  Expand view  RUN
     case nMsg == WM_PASTE
           if GetFocus() == ::hWnd
              CallWindowProc( ::nOldProc, ::hWnd, WM_PASTE, 0, 0 )
              if ValType( ::oGet:Original ) $ "CM"
                 SetWindowText( ::hWnd, SubStr( GetWindowText( ::hWnd ), 1, Len( ::oGet:Original ) ) )
              elseif ValType( ::oGet:Original ) == "N"
                 SetWindowText( ::hWnd, Val( GetWindowText( ::hWnd ) ) )  
              endif
              ...
 

Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: new and important bug in FW 11.11

Postby ukservice » Wed Dec 21, 2011 4:03 pm

Antonio,

I am afraid is not working.

Pasting numbers into a number field does not work. It does paste nothing.

Thanks.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: new and important bug in FW 11.11

Postby norberto » Wed Dec 21, 2011 6:14 pm

HI, im using fwh 11.11 released 13/12 in several appls production, i need fix this and anothers?? please can list fix to apply after 13/12. thanks
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: new and important bug in FW 11.11

Postby Antonio Linares » Wed Dec 21, 2011 6:35 pm

John,

This is right code, thanks:

Code: Select all  Expand view  RUN
     case nMsg == WM_PASTE
           if GetFocus() == ::hWnd
              CallWindowProc( ::nOldProc, ::hWnd, WM_PASTE, 0, 0 )
              if ValType( ::oGet:Original ) $ "CM"
                 SetWindowText( ::hWnd, SubStr( GetWindowText( ::hWnd ), 1, Len( ::oGet:Original ) ) )
              endif
              ::oGet:Buffer = GetWindowText( ::hWnd )
              ::oGet:Pos = GetCaretPos()[ 2 ]
              ::oGet:Assign()
              if ::bChange != nil
                 Eval( ::bChange,,, Self )
              endif
           endif
           return 0
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: new and important bug in FW 11.11

Postby Antonio Linares » Wed Dec 21, 2011 6:44 pm

Norberto,

Image

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: new and important bug in FW 11.11

Postby ukservice » Thu Dec 22, 2011 9:53 am

Antonio,

Thanks. It works now.

Also, it´s pending the other bug in clause NO MODIFY.

In method initiate() you could also comment out SetColor( GetSysColor(COLOR_GRAYTEXT) , GetSysColor( COLOR_BTNFACE )):

if ::lReadOnly .and. ::nClrText == GetSysColor( COLOR_WINDOWTEXT ) ;
.and. ::nClrPane == GetSysColor( COLOR_WINDOW )
// ::SetColor( GetSysColor(COLOR_GRAYTEXT) , GetSysColor( COLOR_BTNFACE ))
// ::Disable()
endif


Thanks
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: new and important bug in FW 11.11

Postby ukservice » Mon Dec 26, 2011 10:47 am

Antonio,

Working code is:

Code: Select all  Expand view  RUN
METHOD Initiate( hDlg ) CLASS TGet

   Super:Initiate( hDlg )
   ::oGet:SetFocus()

   if lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_PASSWORD )
      ::lPassword = .t.
   endif

   // Ballon tooltip when CapsLock is on on XP
   if ::lPassword
      SetWindowLong( ::hWnd, GWL_STYLE,;
                     nOr( GetWindowLong( ::hWnd, GWL_STYLE ), ES_PASSWORD ) )
   endif

   if ::lReadOnly .and. ::nClrText == GetSysColor( COLOR_WINDOWTEXT ) ;
      .and. ::nClrPane == GetSysColor( COLOR_WINDOW )
      ::SetColor( GetSysColor(COLOR_GRAYTEXT) , GetSysColor( COLOR_BTNFACE ))
     //::Disable()
   endif
 


::Disable() can´t be used as the first GET with NO MODIFY clause in a Dialog does not retrive the value.

So just comment out ::SetColor(...).

Thanks.,
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests