ListBox y el setitems

ListBox y el setitems

Postby goosfancito » Sat Jan 16, 2021 8:55 pm

Hola.

donde armo la pantalla tengo esta definicion:

Code: Select all  Expand view
  REDEFINE LISTBOX ::oLb[  1 ] ID 124 OF ::oDlg

   ACTIVATE DIALOG ::oDlg CENTERED ;
   ON INIT ( this:inicializar())
 

y luego en el inicializar:

Code: Select all  Expand view
::oLb[1]:setItems( { "2020", "2021" } )


y cuando corro el programa me tira este error:

Error description: Error BASE/1004 Class: 'NIL' has no exported method: SETITEMS
Args:
[ 1] = U
[ 2] = A { ... }


entiendo que me dice que estoy tratando de usar el methodo setitems cuando el objeto es nil, o sea que no esta definido aun,
mi pregunta es:
como deberia de hacerlo para que funcione?

gracias
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: ListBox y el setitems

Postby Enrico Maria Giordano » Sat Jan 16, 2021 10:40 pm

You have to pass the object owner of oLb to inicializar() method.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8322
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: ListBox y el setitems

Postby goosfancito » Sun Jan 17, 2021 12:35 pm

It is defined like DATA.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm


Re: ListBox y el setitems

Postby goosfancito » Sun Jan 17, 2021 1:44 pm

Potreste aspettarmi fino a domani, quando avrò finito quello che sto programmando e passarvelo come ho concordato.

Grazie Mille!
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm



Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 11 guests