Page 1 of 1

POBLEM USING BRUSH AND SYSREFRESH

Posted: Tue Mar 06, 2012 2:47 pm
by gss200610
I am with the following problem with brush and sysrefreh, I have what I call a dialog before a loop.
she can not be modal use in wait there, 'cause inside the loop, I need to show pro User options, and dialog as an option. i just need to refresh in the ta Say where the dialog created before the loop.
i give sysrefresh duranto tie for not weighing the system. sysrefresh more when I have the brush in the dialog, add, if you also use setcolor and some dialog is zuada.
sujestão how someone has to do, because I need to use sysrefreh or have otherwise. so that the process normally occurs.

sample:

DEFINE BRUSH OBRUSH RESOURCE "TESTE"
DEFINE DIALOG ODLG RESOURCE "MSG" BRUSH OBRUSH

REDEFINE SAY OSAYMSG ID 100 OF ODLG

ACTIVATE DIALOG ODLG CENTER NOWAIT

nRetorno := iniciafuncaositef()
WHILE nRetorono == 10000
nRetorno := continuafuncao( comando, buffer )
if comando == 21
oSaymsg:VarPut( "opcao ") -
endif
SysRefresh() -> Here the brush dialog loses Sinza and is in color, so does the object oSayMSG
ENDDO

Re: POBLEM USING BRUSH AND SYSREFRESH

Posted: Tue Mar 06, 2012 3:12 pm
by ukoenig
Where is Your Dialog-resource ?

DEFINE DIALOG ODLG RESOURCE ????? BRUSH OBRUSH

REDEFINE SAY OSAYMSG ID 100 OF ODLG

Best Regards
Uwe :?:

Re: POBLEM USING BRUSH AND SYSREFRESH

Posted: Tue Mar 06, 2012 4:14 pm
by gss200610
the above code just forgot to put on, ODLG RESOURCE "MSG" BRUSH OBRUSH more I tried all ways, always lose the brush and even color when used setcolor

Re: POBLEM USING BRUSH AND SYSREFRESH

Posted: Tue Mar 06, 2012 5:28 pm
by ukoenig
Because I don't have the Functions after Dialog Nowait,
I can change the Say-value and Color inside a loop
after the DIALOG NOWAIT.
Would that be OK for YOU to get it working ?

Code: Select all

REDEFINE SAY oSay1 VAR cSay1 ID 100 OF oCust UPDATE
oSay1:SetColor( nSayColor,  )
oSay1:SetFont( oFont1 )
oSay1:lTransparent := .T.

ACTIVATE DIALOG oCust  NOWAIT 

// Change Say1 with Condition ( updated inside the loop VAR cSay1 )
// shows result of EXIT
n := 0
DO WHILE n < 20
    n++
    IF n = 15   
        cSay1 := "Test " + LTRIM(STR(n)) 
        nSayColor := 128
    ENDIF
ENDDO
oSay1:SetColor( nSayColor,  )
oSay1:SetText( cSay1 )

RETURN( NIL )
 
Image

Best Regards
Uwe :?:

Re: POBLEM USING BRUSH AND SYSREFRESH

Posted: Tue Mar 06, 2012 6:56 pm
by gss200610
have to say qo object is updated within the loop, because I have to deal with some returns and show a dialog Pro User proceguir complete and tie, so I use the sysrefresh to release the pending cases, or have a way to use, and without sysrefresh say during the update loop. it has to have osay: refresh () but as that will update it

Re: POBLEM USING BRUSH AND SYSREFRESH

Posted: Tue Mar 06, 2012 7:20 pm
by ukoenig
I can only try, to detect any Painting-problem, because I don't know Your Application in Detail.

Your Question :
SysRefresh() -> Here the brush dialog loses Sinza and is in color, so does the object oSayMSG

I added SYSREFRESH() and called another Function inside the LOOP.
No problem at all.
oSay:Refresh() You don't need using oSay:SetText( VAR ) to show another Value.

Best Regards
Uwe :lol:

Re: POBLEM USING BRUSH AND SYSREFRESH - SOLVED

Posted: Tue Mar 06, 2012 8:55 pm
by gss200610
ERROR IS IN THE SOURCE CODE, OBJET BRUSH.

Re: POBLEM USING BRUSH AND SYSREFRESH - SOLVED

Posted: Fri Mar 09, 2012 4:52 pm
by gss200610
gss200610 wrote:ERROR IS IN THE SOURCE CODE, OBJET BRUSH.

Re: POBLEM USING BRUSH AND SYSREFRESH

Posted: Sat Mar 10, 2012 9:23 am
by Antonio Linares
gss,

Could you please provide tech details about your affirmation ? thanks

Re: POBLEM USING BRUSH AND SYSREFRESH

Posted: Sun Mar 11, 2012 8:56 pm
by gss200610
I revised my source code and found the error. Thank you all. I think the error was in some variables from my source