Different behaviour of TSay object

Different behaviour of TSay object

Postby hua » Fri Dec 15, 2006 9:41 am

Code: Select all  Expand view  RUN
#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
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Different behaviour of TSay object

Postby Enrico Maria Giordano » Fri Dec 15, 2006 1:54 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby hua » Fri Dec 15, 2006 2: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.
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Postby Enrico Maria Giordano » Fri Dec 15, 2006 3: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
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby hua » Fri Dec 15, 2006 5: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 :D
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Postby Antonio Linares » Sat Dec 16, 2006 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby hua » Sat Dec 16, 2006 5: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
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 50 guests