refresh on get

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

refresh on get

Post by Silvio »

I not found the error for this simply test

I want refresh the oget[1]

but it make error

Code: Select all

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
kok joek hoa
Posts: 117
Joined: Tue Jan 03, 2006 6:18 pm

Re: refresh on get

Post by kok joek hoa »

Dear Silvio,

You must define array for aGet , like :

local aGet := array(2)


regards,

Kok Joek Hoa
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: refresh on get

Post by Daniel Garcia-Gil »

Silvio...

Genera_Password(nLunghezza,cPassw,aGet)

or this way

aGet:cText :=alltrim( cPass)
aGet:refresh()
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: refresh on get

Post by Silvio »

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
Post Reply