Code that used to work fails

Code that used to work fails

Postby concentra » Tue Nov 29, 2011 11:39 am

Antonio, the folowing code used to work in a previous version and isn't working anymore.
The text and the title do not change and the dialog isn't centered.
Note the NOWAIT clause.

The previous version was 09.11 using xHarbour.com's Pelles C and now I am using Harbour 11.10 + MinGw.
I was unable to test with FW 11.10 version + xHarbour.com because my xHarbour.com's isn't FW 11.10 compatible.
Could you investigate if this is a problem with MinGw, FW version or my code ?
PRG :
Code: Select all  Expand view
#INCLUDE "fivewin.ch"
FUNCTION Main()
   LOCAL oDlgTeste, oTexto, cTexto
   DEFINE DIALOG oDlgTeste RESOURCE 18503 TITLE "Teste Title"
   REDEFINE SAY  oTexto VAR cTexto ID 101 OF oDlgTeste
   ACTIVATE DIALOG oDlgTeste CENTER NOWAIT

   cTexto := "Another text..."
   oTexto:SETTEXT( cTexto )

   MessageBox( 0, "Why dialog text didn't change ?", "Why title didn't change ?", 0 )
RETURN NIL

RC :
Code: Select all  Expand view
#include "winuser.h"
#include "winnt.h"
#include "commctrl.h"

18503 DIALOG DISCARDABLE 13, 22, 250, 100
STYLE WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION|WS_VISIBLE
CAPTION "Teste..."
{
  CONTROL "Text", 101, "Static", SS_CENTER, 2, 9, 245, 15
}
 
User avatar
concentra
 
Posts: 110
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Code that used to work fails

Postby ukoenig » Tue Nov 29, 2011 4:15 pm

I think, that will work with any FWH-version :

ACTIVATE DIALOG oDlgTeste CENTER NOWAIT ;
ON INIT ( oDlgTeste:cTitle := "New Text", ;
cTexto := "Another text...", oTexto:SETTEXT( cTexto ) )


You can force a Dialog-position ( ON INIT ) with :
oDlgTeste:Move( nTop, nLeft, DlgWidth, DlgHeight , .f. )
( possible Calculation of centered Position )

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Code that used to work fails

Postby concentra » Tue Nov 29, 2011 4:54 pm

No, didn't work.

Harbour 3.1.0dev (Rev. 17102).
gcc (tdm-1) 4.5.2-dw2
FW 11.10
User avatar
concentra
 
Posts: 110
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Code that used to work fails

Postby ukservice » Tue Nov 29, 2011 5:00 pm

Hello,

It is working with FWH 11.11, Borland 5.82 and Harbour 3.1
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Code that used to work fails

Postby Antonio Linares » Tue Nov 29, 2011 7:26 pm

Concentra,

We already know what is going on. We are working to fix it, thanks! :-)

It is the same reason for the bug detected by Rimantas!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41403
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Code that used to work fails

Postby Antonio Linares » Tue Nov 29, 2011 7:53 pm

Concentra,

This fix is required in Class TDialog for MinGW:

dialog.prg
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41403
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Code that used to work fails

Postby concentra » Wed Nov 30, 2011 10:01 am

Thanks Antonio.
But the DIALOG.PRG I have isn't the same as yours, the lines aren't the same...
Could you send me the full DIALOG.PRG ?

Maurício Faria
User avatar
concentra
 
Posts: 110
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Code that used to work fails

Postby Antonio Linares » Wed Nov 30, 2011 1:31 pm

Mauricio,

New libs sent to your email :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41403
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 53 guests