Browse of my ADO Class

Re: Browse of my ADO Class

Postby Antonio Linares » Thu Oct 10, 2024 5:02 am

Dear Jose,

We have tested your hwgui example and we have found that dialogs can't be closed unless you close them in a specific (built?) order.
Unless you close the latest shown dialog, the others can't be closed.

You can download the built example from here:
https://github.com/FiveTechSoft/FWH_tools/blob/master/Dialogboxes.exe

source code:
Code: Select all  Expand view
#include "hwgui.ch"

static n := 1

FUNCTION Main()

   hb_ThreadStart( { || Main2() } )
   hb_ThreadStart( { || Main2() } )
   hb_ThreadStart( { || Main2() } )
   hb_ThreadStart( { || Main2() } )
   hb_ThreadStart( { || Main2() } )
   hb_ThreadWaitForAll()
*
   RETURN Nil

FUNCTION Main2()

   LOCAL oDlg

   INIT DIALOG oDlg TITLE Str( n++ ) ;
     AT 200,0 SIZE 400,150

   ACTIVATE DIALOG oDlg

   RETURN Nil

continued in next post...
regards, saludos

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

Re: Browse of my ADO Class

Postby Antonio Linares » Thu Oct 10, 2024 5:15 am

Using your example as a guide, we have detected and fixed where FWH was failing.

I am emailing you the modified FWH libs for bcc77. Please let me know if you need them for MSVC too.
Please confirm me that you get them, thanks.

Still it seems as we have something to fix when closing the dialogs. Sometimes they stop responding, still not sure why.
We can close them in any order, but sometimes they stop responding after closing a dialog. Searching for this...

We do appreciate your great feedback on this :-)
regards, saludos

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

Re: Browse of my ADO Class

Postby Antonio Linares » Thu Oct 10, 2024 5:35 am

Ok, we found it. It was the call to the garbage collector from Class TDialog Method End()

The solution is to call hb_gcAll( .F. ) :-)

Now it is working perfectly! :-) You can close the dialogs in any order (something not possible with Alexander's lib)

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

function Main()

   hb_ThreadStart( { || Main2() } )
   hb_ThreadStart( { || Main2() } )
   hb_ThreadStart( { || Main2() } )
   hb_ThreadStart( { || Main2() } )
   hb_ThreadWaitForAll()

return nil

function Main2()

   local oDlg

   static nDlg := 1

   DEFINE DIALOG oDlg SIZE 400, 300 TITLE Str( nDlg++ )

   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

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

Re: Browse of my ADO Class

Postby Enrico Maria Giordano » Thu Oct 10, 2024 7:23 am

Antonio,

I'm trying to test your sample, but the program just end without any error or crash. What am I missing?
User avatar
Enrico Maria Giordano
 
Posts: 8634
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Browse of my ADO Class

Postby Antonio Linares » Thu Oct 10, 2024 7:38 am

Dear Enrico,

You have to build it this way: (Harbour's multithread support)

samples\buildhmt.bat multi
regards, saludos

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

Re: Browse of my ADO Class

Postby Enrico Maria Giordano » Thu Oct 10, 2024 8:15 am

Ok, hbvmmt.lib, thank you.
User avatar
Enrico Maria Giordano
 
Posts: 8634
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Browse of my ADO Class

Postby JoséQuintas » Sun Oct 13, 2024 3:15 am

Antonio Linares wrote:You can close the dialogs in any order (something not possible with Alexander's lib)


It is possible too, using an extra parameter when building library.

2021-10-31 04:50 UTC-0300 Jose Quintas
! source/winapi/hdialog.prg
! source/winapi/hwindow.prg
! Small change for multithread
Each thread will have it's own dialog and window list
activated only if compile using -DMT_EXPERIMENTAL
No change if do not compile using this parameter



Is this change on fivewin?

Code: Select all  Expand view

METHOD End( nResult ) CLASS TDialog
   ...
   SysRefresh()
   hb_gcAll(.F.)         // Garbage collector

   return .T.
 


Code: Select all  Expand view

test2.prg
dialog.prg
fivewin.hbc
-mt
 


No change for multithread.
JoséQuintas
 
Posts: 27
Joined: Tue Feb 09, 2021 4:20 pm

Re: Browse of my ADO Class

Postby Antonio Linares » Sun Oct 13, 2024 4:03 am

Jose,

> It is possible too, using an extra parameter when building library

very good

> Is this change on fivewin?

Yes, included in the libs that I have sent you
regards, saludos

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

Re: Browse of my ADO Class

Postby JoséQuintas » Sun Oct 13, 2024 4:31 am

Antonio Linares wrote:Yes, included in the libs that I have sent you


Where I can found them ?
JoséQuintas
 
Posts: 27
Joined: Tue Feb 09, 2021 4:20 pm

Re: Browse of my ADO Class

Postby Antonio Linares » Sun Oct 13, 2024 4:59 am

I sent them to your email
regards, saludos

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 15 guests