List Box returns nothing?

Started by docsaintly, August 05, 2009, 09:25:05 PM

Previous topic - Next topic

docsaintly

(defun c:lstBlocks_OnSelChanged (ItemIndex Value /)
   (dcl_messagebox (itoa ItemIndex) "")
   (dcl_DWGPreview_LoadDwg dwgPreview (strcat selectedfolder "\\" Value))
)

The "selectedfolder" var is gotten from the file dialog, i have verified it's contents. The messagebox always returns 0, and when I look at the Value, it always returns nothing. I'm a bit confused on this one. Any help is appreciated.

owenwengerd

A small sample project that demonstrates the problem would help.

docsaintly

#2
If it's not a known problem it's probably just me, I worked around it with:
(setq NValue (last (dcl_ListBox_GetSelectedItems lstBlocks)))

edit: The only special circumstance i can think of is that i'm loading 13,000 items into the list box. As a sidenote, the listbox had no problem with me doing a vl-directory-files and dumping that list into the listbox, but the dwglist crashed the program and shot the memory through the roof when passed the directory name.