RTE in TTabs

RTE in TTabs

Postby hua » Mon Sep 15, 2008 3:47 am

Using 8.02+xHarbour. After activating TTabs and clicking and moving the mouse in the control for a while, it generates a RTE. Here's a reduced-sample:

Code: Select all  Expand view
#include "FiveWin.ch"

static oWnd

function Main()

   local oBar, oPopup, oBtn


   DEFINE WINDOW oWnd TITLE "Test TTabs in dialogs"

   DEFINE BUTTONBAR oBar OF oWnd SIZE 60, 60 2007

   DEFINE BUTTON OF oBar ACTION attach() ;
      RESOURCE "attach" PROMPT "Attach" TOOLTIP "Attach"

   DEFINE BUTTON OF oBar ACTION oWnd:end() ;
      RESOURCE "quit" PROMPT "Exit"


   ACTIVATE WINDOW oWnd

return nil
//----------------------------------------------------------------------------//
function attach()
local oDlg, oTabs

   DEFINE DIALOG oDlg RESOURCE "Test"

   REDEFINE TABS oTabs PROMPTS "One", "Two", "Three" ID 100 OF oDlg

   oDlg:oTop = oTabs

   ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//


Code: Select all  Expand view
#ifdef __FLAT__
   1 24 "WinXP/WindowsXP.Manifest"
#endif

attach BITMAP "../bitmaps/32x32/attach.bmp"
quit   BITMAP "../bitmaps/32x32/quit.bmp"

test DIALOG 78, 72, 194, 119
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
  CONTROL "", 100, "TTabs", 0 | WS_CHILD | WS_VISIBLE, 0, 1, 193, 17
  DEFPUSHBUTTON "OK", IDOK, 12, 96, 50, 14
  PUSHBUTTON "Cancel", IDCANCEL, 72, 96, 50, 14
}


Application
===========
Path and name: J:\harbour\fwh\samples\testtab.EXE (32 bits)
Size: 1,387,520 bytes
Time from start: 0 hours 0 mins 9 secs
Error occurred at: 09/15/08, 11:33:52
Error description: Error BASE/1075 Argument error: >
Args:
[ 1] = U
[ 2] = N 0

Stack Calls
===========
Called from: TABS.PRG => TTABS:MOUSELEAVE(0)
Called from: TABS.PRG => TTABS:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: testtab.prg => ATTACH(34)
Called from: testtab.prg => (b)MAIN(15)
Called from: BTNBMP.PRG => TBTNBMP:CLICK(0)
Called from: BTNBMP.PRG => TBTNBMP:LBUTTONUP(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
Called from: BTNBMP.PRG => TBTNBMP:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from: testtab.prg => MAIN(21)
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Postby Antonio Linares » Tue Sep 16, 2008 3:50 pm

Hua,

Please modify Class TTabs Method MouseLeave() this way:
Code: Select all  Expand view
METHOD MouseLeave( nRow, nCol, nFlags ) CLASS TTabs

   if ::nOver != nil .and. ::nOver > 0
      ::PaintOver( ::nOver, .F. )
   endif

   ::nOver = 0

return nil
regards, saludos

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

Postby hua » Thu Sep 18, 2008 1:34 am

Thanks Antonio! That solved the problem.
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Postby Horizon » Thu Sep 18, 2008 9:35 am

Hi,

Should it be compiled the FWH after modifying any classes.?

How is it effect the my projects?.

Thanks,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Postby Antonio Linares » Thu Sep 18, 2008 10:35 am

Hakan,

Instead of modifying the FWH libraries, you can modify the class PRG, compile it and link it as another OBJ of your application.
regards, saludos

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

Postby Horizon » Thu Sep 18, 2008 11:12 am

You mean I should copy the class prg from FWH\classes to my class directory and compile it with my projects. my same named class is overloads the FWh class.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Postby Antonio Linares » Thu Sep 18, 2008 11:43 am

Hakan,

Yes :-)

Anyhow, we have just published the new FWH 8.09, with all the changes, fixes and enhancements.
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 69 guests