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: 42074
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: 42074
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: 42074
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: 8710
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: 42074
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: 8710
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: 33
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: 42074
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: 33
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: 42074
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Browse of my ADO Class

Postby JoséQuintas » Sun Oct 13, 2024 2:29 pm

At momment no email.
I already check all folders including spam and deleted.
JoséQuintas
 
Posts: 33
Joined: Tue Feb 09, 2021 4:20 pm

Re: Browse of my ADO Class

Postby Antonio Linares » Sun Oct 13, 2024 5:10 pm

Please send me a whatsapp msg to +34 722461100

thanks!
regards, saludos

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

Re: Browse of my ADO Class

Postby JoséQuintas » Mon Oct 14, 2024 10:56 am

Image

working with multithread.
On menu
Code: Select all  Expand view

MENUITEM cDBF ACTION hb_ThreadStart( { || frm_funcMain( cDBF, aAllSetup,.T. ) } )
 

On dialogs: USE DBCLIENT ... CLOSE DATABASES
On all dialogs: click NEXT does a SKIP, and moves from 1 to 2
OK, this is multithread, each dialog have it's own dbf

WITHOUT multithread:
dialog 1: click next, does a skip, and moves from 1 to 2
dialog 2: click next, does a skip, and moves from 1 to 3
dialog 3: click next, does a skip, and moves from 1 to 4
dialog 4: click next, does a skip, and moves from 1 to 5
Ok, it is not multithread, all dialogs uses same dbf, and SKIP on same dbf.

No classes, no extra controls, basic USE/CLOSE.., and multithread.
Any dialog can call another routine, and current record will be the correct record.
No matter if change order, apply filter, or anything else on each thread.
Multithread is the same as several EXEs.
One thread/EXE does not change another.

Many thanks.
JoséQuintas
 
Posts: 33
Joined: Tue Feb 09, 2021 4:20 pm

Re: Browse of my ADO Class

Postby Antonio Linares » Mon Oct 14, 2024 11:29 am

great work, excellent! :-)
regards, saludos

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

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