Page 1 of 1

list control questions

Posted: Wed Oct 18, 2006 1:51 pm
by incoronado
I'm having a strange issue with the list control. If I save a value to the list control and then exit HB, when I go back into HB it shows a previous value that was long since overwritten. It seems to be caching old list entries somehow. Is that even possible?


And just to be sure on the list format...

'record1 data1' & vbTAB & 'record1 data2' & vbLF & 'record2 data1' & vbTAB & 'record2 data2'

The vbLF is the record seperator and it suffixes the record?

Lists values cannot be NULL. Empty lists must contain a single vbLF?

Posted: Wed Oct 18, 2006 3:15 pm
by Richard Naninck
I find that a single vbLF doesn't work so I always put vbLF & " " & vbLF. This displays a space and the vbLF works.

Everything before the first TAB in the format is hidden and is stored in the 'Change Property' of the alphalist and everything behind the first TAB shows up in the 'Display Property'. So you can store information in the Change Property to be able to do certain stuff upon selection of a line in an alphalist. A good example would be:

ListLine = CD_ID & vbTAB & CD_info & vbTAB & CD_Number.

This will store the CD_ID in the Change Property and displays CD_Info followed by a TAB followed by the CD_Number. While selecting such a line, the CD_ID can be processed by triggering a task upon change on the Change Property.
Just make sure all lines look the same concerning the amount of TAB's or things will get messy.

You can also have a look in the scripts section. Many scripts in there process alphalists and you can see how they are built and processed.
If you put "*S-" in front of one of the lines, that will then be the selected one. So if you want to build a list and not necessarily have the first line selected, you can use *S- the auto select another line.

Hope all of this makes sense and answers your question. I am not talking about directory listings here!

Posted: Tue Oct 24, 2006 1:07 am
by incoronado
Any other ideas on the list property problem reverting back to old value once HB is restarted. I can't get HB to permanently store value in list property. It is very annoying.

Posted: Tue Oct 24, 2006 9:09 am
by ScottBot
Be certain that it is an 'AlphaList' property type. You can be sure by setting the values from the HB UI instead of the script. When setting AlphaList Properties from the UI, it will show a dialog that allows you to add/delete/move the items in the list.

Posted: Tue Oct 24, 2006 8:22 pm
by incoronado
OK here's what I've done. I've edited the list manually from the HB interface. Exit HB. When I go back in the value still reverts back. It is an alpha list object. I went back to recreate the object, but it won't let me delete it. Option to delete is grey out. Strange. Two issues may be related??? There are no dependant tasks associated with the property. I thought this might be caused because I had the object assigned to a control in one of my themes. I went into the theme that referenced the object and assigned it to another list object. Exited HB. I went back in and tried to delete the object. No luck. What mechanism would block me from deleting the object? One thing that might have relevance ... I created the property in Property in Property manager. After I created the device for that property, I might have renamed the device. As you know the device's default name that is assigned is the actual name of the property. Other than that, I'm out of ideas.

Posted: Fri Oct 27, 2006 7:13 pm
by incoronado
I found out this had something to do with corrupt values in the initial value field. I could't use the HB interface to clear them out. I had to clear out the initial value in the MDB file using MS Access and everything started working again as expected.