Ye 'ol Web 1.0 cell picture requirements

Sorry this is a Web 1.0 question…I know Web 1.0 usage just won’t die :slight_smile:
Although I do have a current license that includes Web 2.0 – I too have some projects that remain in Web 1.0. I was making a minor update to a remote directory browser that uses Web 1.0 and thought it would be nice to add a picture of a Folder instead of the “DIR” string I currently use to indicate a directory.

I have found that while I can easily add a picture using something like
lbmain.cellPicture(i,0) = smallfolder

I can’t seem to add a picture until the listbox has rendered completely. After I add a row…
lbMain.AddRow(Filetype,FileSize,FileDate,Filename)
I can’t seem to add a Picture yet…because the listbox row hasn’t been rendered yet?

Despite knowing which cell position I want the picture in, and having a good row and column value, I still get an unexplained NilObjectException when trying to attach the picture to any row before the listbox is rendered in the container. Once the listbox is presented to the user… then I can attach the picture to any valid cell location no problem.

Is there some way to attach the web picture before the listbox rows are rendered to the user?
Am I missing something obvious? (Besides rewriting the entire app in web 2.0 right now)

I just built a sample test project and was able to add the picture reference prior to the render…hmmmm. I’m going to start eliminating differences… like placing the Weblistbox in a container… updating it from an asynchronous Shell etc. If I can isolate the issue… I can probably work around it. Simplifying the issue to a stand alone test program turned out to be revealing.

1 Like

Definitely can’t update the cell picture property from an Asynchronous shell. That’s too bad because I really wanted to pull the the data set “in the background” while other tasks may be running. It looks like I would need to use a synchronous Shell to collect the data…and then pass that off to a ListBox update routine. Near as I can tell, I can’t call the update to the listBox from the async shell Completed event. Since I don’t know how long it will take to get the data… I guess I need to perform the update inline with the synchronous shell call. One option is to set a “data ready” flag from the completed event and have a timer look for the flag and call the update the listbox when the flag is set. This only runs for a few seconds at most anyway… so I guess a synchronous shell isn’t that bad.