refresh on get

refresh on get

Postby Silvio » Sat Apr 09, 2011 9:18 am

I not found the error for this simply test

I want refresh the oget[1]

but it make error


Code: Select all  Expand view
Function Test()
LOCAL oDlg
Local cPassw:=space(20)
Local nLunghezza :=6
Local aGet[2]
DEFINE DIALOG oDlg ;
TITLE " GENERATE RANDOM PASSWORD"

@ 2,1 SAY " Password :" OF oDlg
@ 2,7 GET   aGet[1] VAR cPassw  OF oDlg SIZE 40,10   UPDATE

@ 4,1 SAY " Lunghezza:" OF oDlg
@ 4,7 GET  aGet[2] VAR nLunghezza    SIZE 16,10 SPINNER  MIN 1 MAX 20  OF oDlg PICTURE "99"


@ 2,17 BUTTON "..." SIZE 10,10 OF oDlg ACTION Genera_Password(nLunghezza,cPassw,aGet[1])

ACTIVATE DIALOG oDlg ;
on INIT aGet[2]:nHeight:=21.4
RETURN NIL


Function Genera_Password(nLarghezza,cPassw,aGet)

   LOCAL cPass := ""
   LOCAL aPwd := {}
   LOCAL n, c, i, lRet := .T.

  cPass:="eee"



   aGet[1]:cText :=alltrim( cPass)
   aGet[1]:refresh()

  RETURN NIL
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: refresh on get

Postby kok joek hoa » Sat Apr 09, 2011 10:29 am

Dear Silvio,

You must define array for aGet , like :

local aGet := array(2)


regards,

Kok Joek Hoa
kok joek hoa
 
Posts: 117
Joined: Tue Jan 03, 2006 6:18 pm

Re: refresh on get

Postby Daniel Garcia-Gil » Sat Apr 09, 2011 10:34 am

Silvio...

Genera_Password(nLunghezza,cPassw,aGet)

or this way

aGet:cText :=alltrim( cPass)
aGet:refresh()
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: refresh on get

Postby Silvio » Sat Apr 09, 2011 4:09 pm

thanks sorry
I made a mistake

it was Genera_Password(nLunghezza,cPassw,aGet)

and then aget[1]:ctext...

here is too hot , my head explodes sometime especially when I'm at school with my pupils
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 95 guests