Page 3 of 6

Re: Database - 17.07 - Problems

PostPosted: Fri Aug 25, 2017 10:04 pm
by Diego Decandia
Yes, i'm using fwh 17.07

Re: Database - 17.07 - Problems

PostPosted: Fri Aug 25, 2017 10:09 pm
by TimStone
Again, the process of elimination:

Harbour = Same Version
xHarbour = Same Version
FWH 17.07 installed
All external libraries remain the same
Source code remains the same

Substitute datamanager.prg from 17.06 and the problem is fixed. Take it away, allowing datamanager from 17.07, and problem returns.
I'm not seeing how that can be something else ... but then it is Friday afternoon after too much time looking at a computer.

Re: Database - 17.07 - Problems

PostPosted: Sat Aug 26, 2017 6:26 am
by Diego Decandia
Yes, even for me, using Tdatabase from 17.04, all seems ok and < Close clients > always works.

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 9:32 am
by Diego Decandia
I tried to edit TDatabase version 17.07 in this way

Code: Select all  Expand view

PROCEDURE td_destroy() CLASS TDataBase

//   ::End()

RETURN
 


and my problem does not occur. Does it also apply to other problems?

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 10:58 am
by Antonio Linares
This method was recently added to Clase TDataBase:

METHOD End() INLINE ::Close()

Tim, Please remove it and try your app again, thanks

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 11:25 am
by Diego Decandia
Removing Method End, I get

Code: Select all  Expand view

>>>Error BASE/1004  Message not found: TDATABASE:END
   Errore avvenuto il 01/09/17, alle 13:19:15
 
   Chiamato da: .\source\function\HARBOUR.PRG => _CLSSETERROR( 247 )
   Chiamato da: C:\fwh\source\classes\database.prg => TDATABASE:END( 913 )
   Chiamato da: C:\fwh\source\classes\database.prg => TDATABASE:__DESTRUCTOR( 1360 )
   Chiamato da:  => TDATABASE:CLASSH( 0 )
 

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 11:29 am
by Diego Decandia
Ok, removing method End and the call to ::End in td_destroy(), is ok.

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 12:20 pm
by Antonio Linares
Or modify it this way:

METHOD End() VIRTUAL

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 2:07 pm
by James Bott
Antonio,

It was me that requested the End() method. The reason was to conform to polymorphism with this class. Every other class has an End() method but TDatabase only had a Close() method.

There is a new Procedure called TD_Destroy() that was also added in ver 17.07. I don't understand the reason for it. It's only purpose is to end the object and it seems to be doing this at the wrong point. I think we should review why this procedure was added.

PROCEDURE td_destroy() CLASS TDataBase

::End()

RETURN

So, if we just make the End() method virtual, it doesn't end the object and TD_Destroy does nothing. TD_Destroy is NOT being called in the object. The definition in the Class definition is:

DESTRUCTOR td_destroy()

So apparently it is being called outside the class somewhere.

James

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 3:44 pm
by TimStone
I just did a complete FWH\Source file search, and the only place td_destroy( ) is found is in tDatabase.prg

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 3:56 pm
by James Bott
Tim,

Try putting a msgInfo() inside the TD_Destroy procedure (before the ::end() ) and link the revised class into your code. Then recreate the error and see if the message pops up.

I would do it myself, but I have still been unable to recreate the error.

James

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 4:09 pm
by TimStone
James Bott wrote:Tim,

Try putting a msgInfo() inside the TD_Destroy procedure (before the ::end() ) and link the revised class into your code. Then recreate the error and see if the message pops up.

I would do it myself, but I have still been unable to recreate the error.

James
unfortunately Im heading out for a few days


Sent from my iPhone using Tapatalk

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 4:31 pm
by James Bott
Tim,

The thought just occurred to me that it is possible that Windows is calling the destroy procedure. That could explain not finding a call anywhere in the FWH code, but it still getting called.

Have a great trip!

James

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 4:34 pm
by TimStone
Actually heading your way ... to Carlsbad ...

Re: Database - 17.07 - Problems

PostPosted: Fri Sep 01, 2017 4:50 pm
by Diego Decandia
James,

In my test, opening first DLG1 that uses TDatabase, the MsgInfo appears twice before showing dialog and Xbrowse.

If I then open Dlg2 (which uses a dbf), I see the message closing.

If I first open the DLG2, no message is shown.

A bit complex...