FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour ListBox y el setitems
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
ListBox y el setitems
Posted: Sat Jan 16, 2021 08:55 PM
Hola.

donde armo la pantalla tengo esta definicion:

Code (fw): Select all Collapse
   REDEFINE LISTBOX ::oLb[  1 ] ID 124 OF ::oDlg

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

y luego en el inicializar:

Code (fw): Select all Collapse
::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/
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: ListBox y el setitems
Posted: Sat Jan 16, 2021 10:40 PM

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

EMG

Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: ListBox y el setitems
Posted: 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/
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: ListBox y el setitems
Posted: Sun Jan 17, 2021 01:15 PM

Can I see your code?

EMG

Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: ListBox y el setitems
Posted: Sun Jan 17, 2021 01: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/
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Continue the discussion