Bug in REDEFINE SAY?

Bug in REDEFINE SAY?

Postby IBTC » Sat Feb 12, 2011 6:47 pm

Hello!

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

Image

Code: Select all  Expand view
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  Expand view
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  Expand view
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

Re: Bug in REDEFINE SAY?

Postby IBTC » Tue Feb 15, 2011 3:43 pm

This problem still exists in FWH 11.01. :(

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

Code: Select all  Expand view
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  Expand view

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

Re: Bug in REDEFINE SAY?

Postby Jonathan Hodder » Tue Mar 15, 2011 9: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.
Jonathan Hodder
 
Posts: 77
Joined: Sun Aug 26, 2007 11:53 pm

Re: Bug in REDEFINE SAY?

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

Re: Bug in REDEFINE SAY?

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

Re: Bug in REDEFINE SAY?

Postby IBTC » Thu Mar 17, 2011 10:25 pm

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

Re: Bug in REDEFINE SAY?

Postby Enrico Maria Giordano » Mon Mar 28, 2011 9:52 pm



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
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in REDEFINE SAY?

Postby carlos vargas » Tue Apr 19, 2011 5: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)
User avatar
carlos vargas
 
Posts: 1720
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Bug in REDEFINE SAY?

Postby Daniel Garcia-Gil » Tue Apr 19, 2011 6:57 pm

Carlos...

que version de fivewin usas?
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Bug in REDEFINE SAY?

Postby carlos vargas » Tue Apr 19, 2011 7:02 pm

10.07

salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1720
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Bug in REDEFINE SAY? [Solved]

Postby Enrico Maria Giordano » Sun May 29, 2011 5:50 pm

Unfortunately this bug is back in latest FWH:

Code: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in REDEFINE SAY?

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

Re: Bug in REDEFINE SAY?

Postby Enrico Maria Giordano » Sun May 29, 2011 10:23 pm

Many thanks, Master! :-)

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 115 guests