FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour refresh on get
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
refresh on get
Posted: Sat Apr 09, 2011 09:18 AM
I not found the error for this simply test

I want refresh the oget[1]

but it make error


Code (fw): Select all Collapse
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
Posts: 117
Joined: Tue Jan 03, 2006 06:18 PM
Re: refresh on get
Posted: Sat Apr 09, 2011 10:29 AM

Dear Silvio,

You must define array for aGet , like :

local aGet := array(2)

regards,

Kok Joek Hoa

Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: refresh on get
Posted: Sat Apr 09, 2011 10:34 AM
Silvio...

Genera_Password(nLunghezza,cPassw,aGet)

or this way

aGet:cText :=alltrim( cPass)
aGet:refresh()
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: refresh on get
Posted: Sat Apr 09, 2011 04: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

Continue the discussion