OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: garcigj on October 06, 2008, 07:01:47 AM

Title: ListView Problems (1)
Post by: garcigj on October 06, 2008, 07:01:47 AM
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)
Title: Re: ListView Problems (1)
Post by: Fred Tomke on October 06, 2008, 07:44:23 AM
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
Title: Re: ListView Problems (1)
Post by: garcigj on October 06, 2008, 08:05:42 AM
OK. Thanks Fred..
Title: Re: ListView Problems (1)
Post by: Fred Tomke on October 06, 2008, 11:15:17 AM
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
Title: Re: ListView Problems (1)
Post by: garcigj on October 07, 2008, 07:09:46 AM
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