ListView Problems (1)

Started by garcigj · 2008-10-06 14:01 UTC · 4 replies · SMF topic #445

OpenDCL Version 5.0.0.25
ListView Problems:

property "style" = 3 - Report
3 columns

Use: AddItem (For Report Style) as Integer :
(Setq nRow (dcl_ListView_AddItem 2DrawArch_MemCarp_ListView1 IdImage Text1 Text2 Text3)

ERROR: too many arguments

Is this a BUG?

Solution??? :
(Setq nRow (dcl_ListView_AddItem  2DrawArch_MemCarp_ListView1 IdImage Text1 ))  : OK
(dcl_ListView_SetItemText 2DrawArch_MemCarp_ListView1 nRow 1 Text2)
(dcl_ListView_SetItemText 2DrawArch_MemCarp_ListView1 nRow 2 Text3)
Hi, garcigj, have a look into the help. The syntax of arguments have changed between ODCL 4 to ODCL 5!!!

The position is not needed anymore. Try this:

(Setq nRow (dcl_ListView_AddItem 2DrawArch_MemCarp_ListView1 (list IdImage Text1 Text2 Text3))

Fred
OK. Thanks Fred..
Sorry, I just read my answer again and I saw that the first part "The position is not needed anymore. Try this:" doesn't match to the code "(Setq nRow (dcl_ListView_AddItem 2DrawArch_MemCarp_ListView1 (list IdImage Text1 Text2 Text3))". At first I wanted to write that the AddColumns method syntax has changed, too.

Fred
Fred,

We understand anyway, it would be necessary to update the aid, but that is busy walks owen.

Deputy code working:
(dcl_ListView_AddColumns 2DrawArch_MemCarp_ListView1
  (list (list  "Rótulo" 0 90 0)(list  "Ud." 2 32 1)(list  "Bloque Db" 0 90 2)))
......
......
(Setq nRow (dcl_ListView_AddItem  2DrawArch_MemCarp_ListView1 (list IdImage (car Dato) (itoa (cadr Dato)) NameBlkDb)))
.....

thanks