OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: andrew on June 27, 2011, 07:15:33 AM

Title: listview only seeing 1 item of the list
Post by: andrew on June 27, 2011, 07:15:33 AM
i know im missing something, and im sure if it was a hand it would slap me but my listview is only showing 1 item of the list

what am i missing?

here is the code


(defun c:dwghist_dwghist_display_ComboBox1_OnSelChanged (ItemCount histfile / file_list datfile ofil curline)
 (setq datfile (strcat "C:\\" histfile))
 (setq ofil (open datfile "r"))  
  (while (setq curline (read-line ofil))  
     (setq file_list (cons curline file_list))  
 )  
 (close ofil)  

 (setq file_list (reverse file_list))
 (dcl_ListView_Clear dwghist_dwghist_display_ListView1)
 (dcl_ListView_FillList dwghist_dwghist_display_ListView1 (list file_list))
; (dcl_ListView_AddString dwghist_dwghist_display_ListView1 file_list)

(princ)
)
Title: Re: listview only seeing 1 item of the list
Post by: owenwengerd on June 27, 2011, 07:28:51 AM
You need to feed a list of lists to FillList:

Code (autolisp) Select
(dcl_ListView_FillList dwghist_dwghist_display_ListView1 (mapcar 'list file_list))
Title: Re: listview only seeing 1 item of the list
Post by: andrew on June 27, 2011, 09:01:32 AM
gah!

thanks Owen