Listbox con array

Listbox con array

Postby mastintin » Sun Jul 04, 2010 7:05 pm

Estoy tratando de hacer que funcione un listbox con un array , pero o me coge el alias que pilla abierto o produce error :
Code: Select all  Expand view

   
Error BASE/1004  No exported method: EVAL                                      
Called from (b)EVAL(0)                                                          
Called from TWBROWSE:NEW(39)                                                    
Called from TINDICES:MSGSELECT(227)                                            
Called from INDICES(46)            
Called from (b)MAIN(48)
Called from (b)TBUTTON(10)
Called from TBUTTON:CLICK(0)
Called from TWINDOW:HANDLEEVENT(187)
Called from _FMH(255)              
Called from WNDRUN(0)
Called from TWINDOW:ACTIVATE(93)
Called from MAIN(53)  2010-07-04 21:00:52.888 testindices[4689:903] *** attempt

 


el codigo que lanza el error :

Code: Select all  Expand view


 cpath:= path()+"/"


sele (::calias)
(::calias)->(dbgotop())
DBEVAL({|| aadd(aDatos,{.f. , substr( (::calias)->nombre,1,18) })} )

cValue:= aDatos[1,2]

close(::cAlias)

 pausa(len(aDatos))
 pausa(len(aDatos[2]))

  DEFINE DIALOG ::oDlg TITLE "Creación de Indices" ;
      FROM 470, 650 TO 500, 406
     
   @ 330, 240 SAY "Escoja un archivo" OF ::oDlg SIZE 150, 50
     
   
   @ 20, 83 BUTTON obtn PROMPT "OK" OF ::oDlg ACTION pausa(7)
   
   //  BTNSETBEZEL(obtn:hWnd,11)  
   
    @ 200, 90 IMAGE oImg OF ::oDlg SIZE 107, 91 FILENAME cpath+"disco.tiff"
   
    @ 150, 250 LISTBOX oBrw OF ::oDlg SIZE 190, 190

     oBrw:setArray(aDatos)

     oProg = TProgress():New( 74, 28 , 450, 30, ::oDlg, 0 )
 
   @ 20, 318 BUTTON "Cancel" OF ::oDlg ACTION ::oDlg:End()
   
   ACTIVATE DIALOG ::oDlg CENTERED
 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Listbox con array

Postby Antonio Linares » Sun Jul 04, 2010 8:07 pm

Manuel,

Prueba a hacerlo asi:
Code: Select all  Expand view

    @ 150, 250 LISTBOX oBrw FIELDS "", "" HEADERS "Uno", "Dos" OF ::oDlg SIZE 190, 190

     oBrw:setArray( aDatos )
     oBrw:bLine = { | nRow | { If( aDatos[ nRow ][ 1 ], ".T.", ".F." ), aDatos[ nRow ][ 2 ] } }
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Listbox con array

Postby mastintin » Sun Jul 04, 2010 8:17 pm

Perfecto ya funciona .
Gracias.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm


Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: No registered users and 5 guests