Page 1 of 1

dc_getrefresh(getlist ,,,,{"NUMMER})

Posted: Wed Nov 20, 2013 9:15 am
by skiman
Hi,

I have a pushbutton with the following action.

ACTION {|o| cSeek += "7" , dc_getrefresh(getlist ,,,,{"NUMMER") }

I expected that only the getlist elements which belongs to the GROUP 'NUMMER' would be refreshed? The entire screen is flickering as never before.

Any idea what I'm doing wrong?

Re: dc_getrefresh(getlist ,,,,{"NUMMER})

Posted: Wed Nov 20, 2013 11:03 am
by rdonnay
I will have to write a sample program.

I will try to get to this later today.

Re: dc_getrefresh(getlist ,,,,{"NUMMER})

Posted: Wed Nov 20, 2013 11:08 am
by skiman
This is an extract of my code:

Code: Select all

		@ 10, nWidth - 600 dcsay "Nummer: " get cSeek picture '999999' sayright saysize 100,30 getsize 200,30 pixel sayfont '16.Arial' getfont '18.Arial' parent oDlgJob GROUP "NUMMER"
		
		@ 80, nWidth-600 dcpushbuttonxp config oConfig1 notabstop CAPTION "7" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| cSeek += "7" , dc_getrefresh(getlist ,,,,{"NUMMER"}) } ;
            ACCELKEY Asc('7')
		
        @ 80, nWidth - 480 dcpushbuttonxp config oConfig1  notabstop CAPTION "8" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| cSeek += "8" , dc_getrefresh(getlist,,,,{"NUMMER"}) } ;
            ACCELKEY Asc('8')

        @ 80, nWidth - 360  dcpushbuttonxp config oConfig1  notabstop CAPTION "9" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob;
            ACTION {|o| cSeek += "9" , dc_getrefresh(getlist,,,,{"NUMMER"} )} ;
            ACCELKEY Asc('9')

        @ 160, nWidth-600  dcpushbuttonxp config oConfig1  notabstop CAPTION "4" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| cSeek += "4" , dc_getrefresh(getlist,,,,{"NUMMER"}) } ;
            ACCELKEY Asc('4')

        @ 160, nWidth - 480  dcpushbuttonxp config oConfig1  notabstop CAPTION "5" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| cSeek += "5" , dc_getrefresh(getlist,,,,{"NUMMER"}) } ;
            ACCELKEY Asc('5')

        @ 160, nWidth - 360 dcpushbuttonxp config oConfig1  notabstop CAPTION "6" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| cSeek += "6" , dc_getrefresh(getlist,,,,{"NUMMER"} )} ;
            ACCELKEY Asc('6')

        @ 240, nWidth-600 dcpushbuttonxp config oConfig1  notabstop CAPTION "1" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| cSeek += "1" , dc_getrefresh(getlist,,,,{"NUMMER"} )} ;
            ACCELKEY Asc('1')

        @ 240, nWidth - 480 dcpushbuttonxp config oConfig1  notabstop CAPTION "2" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| cSeek += "2" , dc_getrefresh(getlist,,,,{"NUMMER"}) } ;
            ACCELKEY Asc('2')

        @ 240, nWidth - 360 dcpushbuttonxp config oConfig1  notabstop CAPTION "3" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| cSeek += "3" , dc_getrefresh(getlist,,,,{"NUMMER"}) } ;
            ACCELKEY Asc('3')

        @ 320, nWidth-600  dcpushbuttonxp config oConfig1  notabstop CAPTION "0" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| cSeek += "0" , dc_getrefresh(getlist,,,,{"NUMMER"}) } ;
            ACCELKEY Asc('0')

        @ 320, nWidth-480  dcpushbuttonxp config oConfig1  notabstop CAPTION "OK" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| bon1->(dbseek(cSoort+"  1"+padl(cSeek,6," "))) , dc_getrefresh(getlist) }

        @ 320, nWidth-360  dcpushbuttonxp config oConfig1  notabstop CAPTION "Reset" PIXEL SIZE 100,65 FONT "24.Arial" parent oDlgJob ;
            ACTION {|o| cSeek :="" , dc_getrefresh(getlist,,,,{"NUMMER"}) } 


Re: dc_getrefresh(getlist ,,,,{"NUMMER})

Posted: Wed Nov 20, 2013 2:50 pm
by rdonnay
Here is my test program.

Please compile and run it.
It works correctly for me.

I have tested with build 258 and 259.

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

LOCAL GetList[0], i, j

FOR i := 1 TO 20
  FOR j := 0 TO 6
    @ i,j*10 DCPUSHBUTTON CAPTION {||Time()} SIZE 9
  NEXT
NEXT

@ i+1,0 DCPUSHBUTTON CAPTION {||Time()} SIZE 20, 2 GROUP 'NUMMER' ;
        FONT '10.Lucida Console Bold'

@ i+3,0 DCPUSHBUTTON CAPTION 'Refresh NUMMER' SIZE 20, 1.2 ;
   ACTION {||DC_GetRefresh(GetList,,,,{'NUMMER'})}

@ DCGUI_ROW, DCGUI_COL + 10 DCPUSHBUTTON CAPTION 'Refresh ALL' SIZE 20, 1.2 ;
   ACTION {||DC_GetRefresh(GetList)}

DCREAD GUI FIT TITLE 'Refresh Test'

RETURN nil

* ----------

PROC appsys ; return

Re: dc_getrefresh(getlist ,,,,{"NUMMER})

Posted: Thu Nov 21, 2013 3:29 am
by skiman
Hi,

After testing I was wondering why this wasn't working. I'm using this for years. I found the cause, it's the type of the parent.

I've used for the first time dcdialog as parent. This is the cause.

Changing:
@ 90,152 DCDIALOG oDlgJob SIZE nWidth-170,800 NOTITLEBAR hide {|| !lJob }

to the following:
@ 90,152 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDRECT OBJECT oDlgJob SIZE nWidth-170,800 hide {|| !lJob }

solved my problem.

Re: dc_getrefresh(getlist ,,,,{"NUMMER})

Posted: Thu Nov 21, 2013 7:32 am
by rdonnay
That's interesting.

Are you saying that I would see this problem if I put all the buttons from my test program on to a DCDIALOG object?

Re: dc_getrefresh(getlist ,,,,{"NUMMER})

Posted: Thu Nov 21, 2013 11:19 am
by skiman
Hi Roger,

Yes, I suppose you would see the problem then. Replacing the dcdialog with a dcstatic resolved my problem.