FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in REDEFINE SAY?
Posts: 103
Joined: Sat Oct 18, 2008 08:13 PM
Bug in REDEFINE SAY?
Posted: Sat Feb 12, 2011 06:47 PM
Hello!

If I use TRANSPARENT with DIALOG the displayed text of REDEFINED SAY is cutted:



Code (fw): Select all Collapse
function DialogFromResource1()

   local oDlg
   LOCAL cText

   cText := "*** Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ***"

   DEFINE DIALOG oDlg NAME "DIALOG1" COLOR NIL,RGB(239,239,231) TRANSPARENT

   REDEFINE SAY PROMPT cText ID 500 OF oDlg

   ACTIVATE DIALOG oDlg

return nil


without TRANSPARENT the whole text is displayed:



Code (fw): Select all Collapse
function DialogFromResource2()

   local oDlg
   LOCAL cText

   cText := "*** Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ***"

   DEFINE DIALOG oDlg NAME "DIALOG1" COLOR NIL,RGB(239,239,231)

   REDEFINE SAY PROMPT cText ID 500 OF oDlg

   ACTIVATE DIALOG oDlg

return nil


The resource file:

Code (fw): Select all Collapse
DIALOG1 DIALOGEX DISCARDABLE 44, 23, 400, 107
STYLE WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
FONT 8, "MS Sans Serif"
{
  CONTROL "", 500, "Static", WS_GROUP, 8, 18, 388, 68
}


How can this bug fixed?
Best Regards,

Ruediger Alich



---

HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
Posts: 103
Joined: Sat Oct 18, 2008 08:13 PM
Re: Bug in REDEFINE SAY?
Posted: Tue Feb 15, 2011 03:43 PM
This problem still exists in FWH 11.01. :-)

And now I also found a (new?) Memory leak:

Code (fw): Select all Collapse
02/15/11 16:37:12: BRUSH,3048,TDIALOG:SETCOLOR(2477)->TDIALOG:NEW(196)->DIALOGFROMRESOURCE1(39)->(b)MAIN(19)->TBTNBMP:CLICK(466)->TBTNBMP:LBUTTONUP(661)->TCONTROL:HANDLEEVENT(1489)->TBTNBMP:HANDLEEVENT(1453)->_FWH(3408)->WINRUN(0)->TWINDOW:ACTIVATE(992)->MAIN(22)


The code:

Code (fw): Select all Collapse
FUNCTION MAIN()

   LOCAL oWnd

   SetResDebug()

   DEFINE WINDOW oWnd FROM 1, 1 TO 10, 40 ;
      TITLE "Test"

   @ 15, 10 BTNBMP oBtn OF oWnd SIZE 140, 20 PROMPT "Dialog from Resource" 2007 ACTION DialogFromResource1()
   @ 50, 10 BTNBMP oBtn OF oWnd SIZE 140, 20 PROMPT "Dialog from Resource" 2007 ACTION DialogFromResource2()

   ACTIVATE WINDOW oWnd

   FERASE("CHECKRES.TXT")
   CHECKRES()
   winExec("notepad .\checkres.txt")

return(0)


Rest of the code see above, also the rc file.
Best Regards,

Ruediger Alich



---

HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
Posts: 77
Joined: Sun Aug 26, 2007 11:53 PM
Re: Bug in REDEFINE SAY?
Posted: Tue Mar 15, 2011 09:38 PM

Hi Ruediger

Re: text display ........................reprehend <end>

It looks like you have reached the limit of a character field. 255 happends to be the mac character field in clipper/dbase file.
Maybe it is the version of harbour that has changed to enforce the limit?

Try using MsgInfo() to disply 'cText' to see whats there. MsgInfo() is a windows display function.

You would normally use LTEXT in your resources to display static text.
Have you tried to use memo resources to display it. An example is the way I use an RC to capture text as a memo.

EDITTEXT 110, 16, 46, 342, 128, ES_MULTILINE | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | WS_TABSTOP

The 'Say' class does not have a MEMO multi line option but 'get' class does.
I have never used 'Say' for such long text!
I'm interested in your solution to this.

Posts: 103
Joined: Sat Oct 18, 2008 08:13 PM
Re: Bug in REDEFINE SAY?
Posted: Tue Mar 15, 2011 10:23 PM
Hi Jonathan,

Jonathan Hodder wrote:It looks like you have reached the limit of a character field. 255 happends to be the mac character field in clipper/dbase file.
Maybe it is the version of harbour that has changed to enforce the limit?


Everything work well without TRANSPARENT, only if I add TRANSPARENT (with the same Harbour version, the same FWH version, the same rest of source code etc.) the whole text isn't displayed. So, for me, it seems that there must be a bug in FWH. If I reached a limit of a character field with SAY, why did the problem didn't exists without TRANSPARENT, only with TRANSPARENT?

Jonathan Hodder wrote:Have you tried to use memo resources to display it.


Thanks for this idea. I will try it ASAP.
Best Regards,

Ruediger Alich



---

HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Bug in REDEFINE SAY?
Posted: Wed Mar 16, 2011 01:34 AM
Hi Ruediger

already fixed...

you can use momentarily this patch...

http://www.sitasoft.net/fivewin/files/patch.obj

link before fivewin lib

this a sample working, thanks for the samples posted... was very useful help to solve the problem
http://www.sitasoft.net/fivewin/samples/ibtc.zip
Posts: 103
Joined: Sat Oct 18, 2008 08:13 PM
Re: Bug in REDEFINE SAY?
Posted: Thu Mar 17, 2011 10:25 PM
Hi Daniel,

Daniel Garcia-Gil wrote:
already fixed...

you can use momentarily this patch...


Thanks. It works. :-)
Best Regards,

Ruediger Alich



---

HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in REDEFINE SAY?
Posted: Mon Mar 28, 2011 09:52 PM
Daniel Garcia-Gil wrote:http://www.sitasoft.net/fivewin/samples/ibtc.zip


Unfortunately, your sample doesn't work correctly in the new FWH release. One star at the end of the phrase is missing.

EMG
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Bug in REDEFINE SAY?
Posted: Tue Apr 19, 2011 05:53 PM

Daniel, Antonio

podrian, poner el patch.obj para microsoft o pelles c compiler.

gracias.

salu2
carlos vargas

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Bug in REDEFINE SAY?
Posted: Tue Apr 19, 2011 06:57 PM

Carlos...

que version de fivewin usas?

Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Bug in REDEFINE SAY?
Posted: Tue Apr 19, 2011 07:02 PM

10.07

salu2
carlos vargas

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in REDEFINE SAY? [Solved]
Posted: Sun May 29, 2011 05:50 PM
Unfortunately this bug is back in latest FWH:

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg;
           TRANSPARENT

    @ 1, 1 SAY "This is a test"

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


:-)

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bug in REDEFINE SAY?
Posted: Sun May 29, 2011 10:16 PM

Enrico,

Fixed :-)

We are going to publish a revised FWH 11.05

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in REDEFINE SAY?
Posted: Sun May 29, 2011 10:23 PM

Many thanks, Master! :-)

EMG

Continue the discussion