FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Different behaviour of TSay object
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Different behaviour of TSay object
Posted: Fri Dec 15, 2006 09:41 AM
#include "FiveWin.ch"

static no, oDlg, oSay2

function Main()
   local oSay

   no := 0

   DEFINE DIALOG oDlg
      @ 1, 2 SAY oSay  PROMPT "Current no: "+ltrim(str(no)) update
      @ 2, 2 SAY oSay2 PROMPT "x" size 50,10 update
      @ 3,3 BUTTON "Increment"  OF oDlg ACTION refreshNo()

   ACTIVATE DIALOG oDlg CENTERED

   msginfo(no)
return nil
//----------------------------------------------------------------------------
function refreshNo()
   no++
   oSay2:setText(ltrim(str(no)))
   oDlg:update()
return nil


These are the behaviour observed when the above code is compiled using xHarbour 0.99.41+FWH2.6 (old method) and xHarbour 0.99.61+FWH 2.8 Nov (new method)

Old Method
Everytime the Increment button is pressed oSay would show the most current value of no while oSay2 won't.

New Method
Everytime the Increment button is pressed oSay2 would show the most current value of no while oSay won't.

So...
I'm not sure this difference in behaviour is due to changes in xHarbour or FWH but I desperately need to get the old behaviour back as lots of my code rely on such behaviour. Anyone can shed an idea on this? It's quite urgent as I've recompiled all my programs with the latest xHarbour and I want to avoid any further surprises.

Thanks
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Different behaviour of TSay object
Posted: Fri Dec 15, 2006 01:54 PM

Tried with latest FWH and found it working the old way.

EMG

Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Different behaviour of TSay object
Posted: Fri Dec 15, 2006 02:29 PM
Thanks for the feedback Enrico. Appreciate it. Just to seek out what's different as I'm also using the latest FWH, did you click the Increment button more than once? And did you use Harbour or xHarbour and which build was it?

I believe what I've encountered is what cdmmaui describe in his later post in this thread.

Again, thanks.
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Different behaviour of TSay object
Posted: Fri Dec 15, 2006 03:02 PM
hua wrote:Thanks for the feedback Enrico. Appreciate it. Just to seek out what's different as I'm also using the latest FWH, did you click the Increment button more than once?


Yes.

hua wrote:And did you use Harbour or xHarbour and which build was it?


Latest Harbour and xHarbour from CVS.

EMG
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Different behaviour of TSay object
Posted: Fri Dec 15, 2006 05:35 PM
EnricoMaria wrote:
Latest Harbour and xHarbour from CVS.


Thanks for the prompt reply Enrico and also thanks to you I believe I might've found the source of the difference as I'm not using the latest xHarbour from CVS. I'll let you know once I tried with the latest version in CVS :-)
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Different behaviour of TSay object
Posted: Sat Dec 16, 2006 01:16 AM

Hua,

Take Class TSay from FWH2.6 and use it instead of FWH2.8 one.

If you compare them, you'll see the differences.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Different behaviour of TSay object
Posted: Sat Dec 16, 2006 05:58 PM
Well here's the result of my test. I couldn't get TortoiseCVS to download xHarbour source for some reason. Luckily the binaries for xHarbour 0.99.70 is already out.

Even after I recompiled with latest xHarbour, oSay still doesn't get updated as the value held by no var is incremented. I couldn't get the result that Enrico got. Only by doing what Antonio suggested (linking in TSay of an older version) was I able to get oSay behaving like I wanted. Unfortunately, by doing so oSay2 doesn't get updated anymore
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion