Bug in REDEFINE SAY?

Post Reply
User avatar
IBTC
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany
Contact:

Bug in REDEFINE SAY?

Post by IBTC »

Hello!

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

Image

Code: Select all

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:

Image

Code: Select all

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: Select all

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
User avatar
IBTC
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany
Contact:

Re: Bug in REDEFINE SAY?

Post by IBTC »

This problem still exists in FWH 11.01. :(

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

Code: Select all

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: Select all

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
Jonathan Hodder
Posts: 77
Joined: Sun Aug 26, 2007 11:53 pm

Re: Bug in REDEFINE SAY?

Post by Jonathan Hodder »

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.
User avatar
IBTC
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany
Contact:

Re: Bug in REDEFINE SAY?

Post by IBTC »

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
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: Bug in REDEFINE SAY?

Post by Daniel Garcia-Gil »

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
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
IBTC
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany
Contact:

Re: Bug in REDEFINE SAY?

Post by IBTC »

Hi Daniel,
Daniel Garcia-Gil wrote: already fixed...

you can use momentarily this patch...
Thanks. It works. :D
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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Bug in REDEFINE SAY?

Post by Enrico Maria Giordano »

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

EMG
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Bug in REDEFINE SAY?

Post by carlos vargas »

Daniel, Antonio

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

gracias.


salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: Bug in REDEFINE SAY?

Post by Daniel Garcia-Gil »

Carlos...

que version de fivewin usas?
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Bug in REDEFINE SAY?

Post by carlos vargas »

10.07

salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Bug in REDEFINE SAY? [Solved]

Post by Enrico Maria Giordano »

Unfortunately this bug is back in latest FWH:

Code: Select all

#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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Bug in REDEFINE SAY?

Post by Antonio Linares »

Enrico,

Fixed :-)

We are going to publish a revised FWH 11.05
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply