ListView Problems (1)

Started by garcigj, October 06, 2008, 07:01:47 AM

Previous topic - Next topic

garcigj

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)
José Luis García Galán
Hispacad.com - Expertos en CAD 
Madrid (Spain)

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

garcigj

José Luis García Galán
Hispacad.com - Expertos en CAD 
Madrid (Spain)

Fred Tomke

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 Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

garcigj

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
José Luis García Galán
Hispacad.com - Expertos en CAD 
Madrid (Spain)