FWH_2407 oSay does not assume nHeight

FWH_2407 oSay does not assume nHeight

Postby vinhesoft » Wed Aug 21, 2024 12:09 pm

good morning

via command does not assume nHeight

@ 057,376 SAY oTest PROMPT 'Test' PIXEL
? oTest:nHeight --> 22

@ 057,376 SAY oTest PROMPT 'Test' PIXEL SIZE 015,007
? oTest:nHeight --> 22

------------------------------------

via property yes

oTest:nHeight := 7
? oTest:nHeight --> 7
João Carlos
VinheSoft Informatica
BCC 7.7 - FHW 24.07 - Harbour 3.2.0dev (r2404101339) for BCC 7.7
vinhesoft
 
Posts: 36
Joined: Sat Sep 03, 2016 3:11 pm
Location: Campinas/SP-Brasil

Re: FWH_2407 oSay does not assume nHeight

Postby Antonio Linares » Wed Aug 21, 2024 12:42 pm

Dear Joao,

You are overwritting the SAY object. Please test it this way and you will see it is fine:
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

    local oWnd, oTest1, oTest2

    DEFINE WINDOW oWnd

    @ 057,376 SAY oTest1 PROMPT 'Test' PIXEL
    ? oTest1:nHeight

    @ 057,376 SAY oTest2 PROMPT 'Test' PIXEL SIZE 015,007
    ? oTest2:nHeight

    ACTIVATE WINDOW oWnd

return nil  
regards, saludos

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

Re: FWH_2407 oSay does not assume nHeight

Postby vinhesoft » Wed Aug 21, 2024 1:03 pm

DEFINE WINDOW oWnd

@ 057,376 SAY oTest1 PROMPT 'Test' PIXEL
? oTest1:nHeight --> 22

@ 057,376 SAY oTest2 PROMPT 'Test' PIXEL SIZE 015,007
? oTest2:nHeight --> 22

ACTIVATE WINDOW oWnd
João Carlos
VinheSoft Informatica
BCC 7.7 - FHW 24.07 - Harbour 3.2.0dev (r2404101339) for BCC 7.7
vinhesoft
 
Posts: 36
Joined: Sat Sep 03, 2016 3:11 pm
Location: Campinas/SP-Brasil

Re: FWH_2407 oSay does not assume nHeight

Postby Antonio Linares » Wed Aug 21, 2024 1:07 pm

Here we get 16 and 11 using FWH 24.07 and bcc77 32 bits
regards, saludos

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

Re: FWH_2407 oSay does not assume nHeight

Postby vinhesoft » Wed Aug 21, 2024 1:15 pm

DEFINE WINDOW oWnd

@ 057,376 SAY oTest1 PROMPT 'Test' PIXEL
? oTest1:nHeight --> 16

@ 057,376 SAY oTest2 PROMPT 'Test' PIXEL SIZE 015,007
? oTest2:nHeight --> 11

here it should be 7 ?

ACTIVATE WINDOW oWnd
João Carlos
VinheSoft Informatica
BCC 7.7 - FHW 24.07 - Harbour 3.2.0dev (r2404101339) for BCC 7.7
vinhesoft
 
Posts: 36
Joined: Sat Sep 03, 2016 3:11 pm
Location: Campinas/SP-Brasil

Re: FWH_2407 oSay does not assume nHeight

Postby Antonio Linares » Thu Aug 22, 2024 2:17 pm

Dear Joao,

Please use this:

@ 057,376 SAY oTest2 PROMPT 'Test' PIXEL SIZE 015,007
oTest2:SetSize( 15, 7 )

Class TSay does some calculations, but if you need that exact size, then use Method SetSize( nWidth, nHeight )
regards, saludos

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

Re: FWH_2407 oSay does not assume nHeight

Postby vinhesoft » Thu Aug 22, 2024 4:45 pm

Dear Antonio

@ 057,376 SAY oTest2 PROMPT 'Test' PIXEL SIZE 015,007

SIZE 015,007 -->> does not assume the informed standard? when we inform the pattern, oSay should follow it.

I have to use it like this ?

@ 057,376 SAY oTest2 PROMPT 'Test' PIXEL SIZE 015,007 ; oTest2:SetSize( 15, 7 )
João Carlos
VinheSoft Informatica
BCC 7.7 - FHW 24.07 - Harbour 3.2.0dev (r2404101339) for BCC 7.7
vinhesoft
 
Posts: 36
Joined: Sat Sep 03, 2016 3:11 pm
Location: Campinas/SP-Brasil

Re: FWH_2407 oSay does not assume nHeight

Postby Antonio Linares » Thu Aug 22, 2024 4:53 pm

You can modify the command in FiveWin.ch:

#xcommand @ <nRow>, <nCol> SAY [ <oSay> <label: PROMPT,VAR > ] <cText> ;
[ <pict: PICT, PICTURE> <cPict> ] ;
[ <dlg: OF,WINDOW,DIALOG > <oWnd> ] ;
[ FONT <oFont> ] ;
[ <lCenter: CENTERED, CENTER > ] ;
[ <lRight: RIGHT > ] ;
[ <lBorder: BORDER > [CLR <nClrBorder>] ] ;
[ [<relpix:RELATIVE>] <lPixel: PIXEL, PIXELS > ] ;
[ <color: COLOR,COLORS > <nClrText> [,<nClrBack> ] ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ <design: DESIGN > ] ;
[ <update: UPDATE > ] ;
[ <lShaded: SHADED, SHADOW > ] ;
[ <lBox: BOX > ] ;
[ <lRaised: RAISED > ] ;
[ <adj: ADJUST> ] ;
[ <lTrans: TRANSPARENT>];
[ <uni: UNICODE, ANSI> ] ;
[ <lVCenter: VCENTER> ] ;
[ CARGO <uCargo> ] ;
=> ;
[ <oSay> := ] TSay():New( <nRow>, <nCol>, <{cText}>,;
[<oWnd>], [<cPict>], <oFont>, <.lCenter.>, <.lRight.>, <.lBorder.>,;
<.lPixel.>, <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;
<.design.>, <.update.>, <.lShaded.>, <.lBox.>, <.lRaised.>, <.adj.>,;
<.lTrans.>, [<(oSay)>], [Upper( Left( <"uni">, 1 ) ) == "U"], <.lVCenter.>, [<uCargo>], [<.relpix.>], <nClrBorder> ); [ <oSay>:SetSize( <nWidth>, <nHeight> ) ]

You are right and I agree that SIZE clause should be enough, but in the evolution of FWH along many years, Class TSay behaves like that
regards, saludos

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

Re: FWH_2407 oSay does not assume nHeight

Postby vinhesoft » Thu Aug 22, 2024 5:37 pm

ADMP0002.PRG(226) Error E0061 Implicit send operator with no WITH OBJECT in sight
João Carlos
VinheSoft Informatica
BCC 7.7 - FHW 24.07 - Harbour 3.2.0dev (r2404101339) for BCC 7.7
vinhesoft
 
Posts: 36
Joined: Sat Sep 03, 2016 3:11 pm
Location: Campinas/SP-Brasil

Re: FWH_2407 oSay does not assume nHeight

Postby Antonio Linares » Thu Aug 22, 2024 6:47 pm

Please compile using -p flag and review the generated ppo file
regards, saludos

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

Re: FWH_2407 oSay does not assume nHeight

Postby vinhesoft » Thu Aug 22, 2024 8:06 pm

static aFwStack := {}
static _fwhtmp_ := nil
#line 3 "test.prg"
function Main

oWnd := TWindow():New(,,,,,,,,,,,,,,,, !.F., !.F., !.F., !.F., .F.,, "oWnd",,,, )

oTest1 := TSay():New( 057, 376, {|| "Test"},,,, .F., .F., .F., .T.,,,,, .F., .F., .F., .F., .F., .F., .F., "oTest1",, .F.,,, ) ; oTest1:SetSize(, )
WQout( { oTest1:nHeight } )

oTest2 := TSay():New( 057, 376, {|| "Test"},,,, .F., .F., .F., .T.,,, 015, 007, .F., .F., .F., .F., .F., .F., .F., "oTest2",, .F.,,, ) ; oTest2:SetSize( 015, 007 )
WQout( { oTest2:nHeight } )

oWnd:Activate(, oWnd:bLClicked, oWnd:bRClicked, oWnd:bMoved, oWnd:bResized, oWnd:bPainted, oWnd:bKeyDown, oWnd:bInit,,,,,,,,,,, oWnd:bLButtonUp, .F. )

return NIL
João Carlos
VinheSoft Informatica
BCC 7.7 - FHW 24.07 - Harbour 3.2.0dev (r2404101339) for BCC 7.7
vinhesoft
 
Posts: 36
Joined: Sat Sep 03, 2016 3:11 pm
Location: Campinas/SP-Brasil

Re: FWH_2407 oSay does not assume nHeight

Postby Antonio Linares » Fri Aug 23, 2024 5:37 am

thank you

what source code do you have here ?

ADMP0002.PRG(226)
regards, saludos

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

Re: FWH_2407 oSay does not assume nHeight

Postby vinhesoft » Fri Aug 23, 2024 3:55 pm

line 226: @ 010,010 SAY 'Código' FONT oF01_ SIZE 090,010 PIXEL TRANSPARENT

ppo: TSay():New( 010, 010, {|| "Código"},,, oF01_, .F., .F., .F., .T.,,, 090, 010, .F., .F., .F., .F., .F., .F., .T.,,, .F.,,, ) ;:SetSize( 090, 010 )

E:\Sistemas\WinADMpro>harbour admp0002 -p -n
Harbour 3.2.0dev (r2404101339)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling 'admp0002.prg' and generating preprocessed output to 'admp0002.ppo'...
admp0002.prg(226) Error E0061 Implicit send operator with no WITH OBJECT in sight
João Carlos
VinheSoft Informatica
BCC 7.7 - FHW 24.07 - Harbour 3.2.0dev (r2404101339) for BCC 7.7
vinhesoft
 
Posts: 36
Joined: Sat Sep 03, 2016 3:11 pm
Location: Campinas/SP-Brasil

Re: FWH_2407 oSay does not assume nHeight

Postby Antonio Linares » Fri Aug 23, 2024 4:04 pm

Can you please confirm that you are using using this rule this way ?

[ <oSay> := ] TSay():New( <nRow>, <nCol>, <{cText}>,;
[<oWnd>], [<cPict>], <oFont>, <.lCenter.>, <.lRight.>, <.lBorder.>,;
<.lPixel.>, <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;
<.design.>, <.update.>, <.lShaded.>, <.lBox.>, <.lRaised.>, <.adj.>,;
<.lTrans.>, [<(oSay)>], [Upper( Left( <"uni">, 1 ) ) == "U"], <.lVCenter.>, [<uCargo>], [<.relpix.>], <nClrBorder> ); [ <oSay>:SetSize( <nWidth>, <nHeight> ) ]
regards, saludos

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

Re: FWH_2407 oSay does not assume nHeight

Postby vinhesoft » Fri Aug 23, 2024 5:21 pm

Yes!

Code: Select all  Expand view
#xcommand @ <nRow>, <nCol> SAY [ <oSay> <label: PROMPT,VAR > ] <cText> ;
             [ <pict: PICT, PICTURE> <cPict> ] ;
             [ <dlg: OF,WINDOW,DIALOG > <oWnd> ] ;
             [ FONT <oFont> ]  ;
             [ <lCenter: CENTERED, CENTER > ] ;
             [ <lRight:  RIGHT >    ] ;
             [ <lBorder: BORDER > [CLR <nClrBorder>] ] ;
             [ [<relpix:RELATIVE>] <lPixel: PIXEL, PIXELS > ] ;
             [ <color: COLOR,COLORS > <nClrText> [,<nClrBack> ] ] ;
             [ SIZE <nWidth>, <nHeight> ] ;
             [ <design: DESIGN >  ] ;
             [ <update: UPDATE >  ] ;
             [ <lShaded: SHADED, SHADOW > ] ;
             [ <lBox:    BOX   >  ] ;
             [ <lRaised: RAISED > ] ;
             [ <adj: ADJUST> ] ;
             [ <lTrans: TRANSPARENT>];
             [ <uni: UNICODE, ANSI> ] ;
             [ <lVCenter: VCENTER> ] ;
             [ CARGO <uCargo> ] ;
      => ;
          [ <oSay> := ] TSay():New( <nRow>, <nCol>, <{cText}>,;
             [<oWnd>], [<cPict>], <oFont>, <.lCenter.>, <.lRight.>, <.lBorder.>,;
             <.lPixel.>, <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;
             <.design.>, <.update.>, <.lShaded.>, <.lBox.>, <.lRaised.>, <.adj.>,;
             <.lTrans.>, [<(oSay)>], [Upper( Left( <"uni">, 1 ) ) == "U"], <.lVCenter.>, [<uCargo>], [<.relpix.>], <nClrBorder> ) ; [ <oSay>:SetSize( <nWidth>, <nHeight> ) ]


works when there is an object reference:
code: @ 057,376 SAY oTest1 PROMPT 'Test' PIXEL
oop: oTest1 := TSay():New( 057, 376, {|| "Test"},,,, .F., .F., .F., .T.,,,,, .F., .F., .F., .F., .F., .F., .F., "oTest1",, .F.,,, ) ; oTest1:SetSize(, )

does not work when there is no object reference:
code: @ 057,376 SAY 'Test' PIXEL
oop: TSay():New( 057, 376, {|| "Test"},,,, .F., .F., .F., .T.,,,,, .F., .F., .F., .F., .F., .F., .F.,,, .F.,,, ) ;:SetSize(, )

????:SetSize(, )
João Carlos
VinheSoft Informatica
BCC 7.7 - FHW 24.07 - Harbour 3.2.0dev (r2404101339) for BCC 7.7
vinhesoft
 
Posts: 36
Joined: Sat Sep 03, 2016 3:11 pm
Location: Campinas/SP-Brasil

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 53 guests