Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

ListBox


2 replies to this topic

woter324

woter324
  • Full Members
  • 18 posts

Posted 19 July 2006 - 16:43

Hi,

BACKGROUND:
During the dialog phase, a VBScript runs that populates the ListBox table with a property of SERVERS_AVAILABLE for each item found by the VBScript. These values are shown in a right hand ListBox control.

There is an "Add>>" button that changes the property to SERVERS_SELECTED, thus showing the value in a left hand ListBox control. (All similar to Stefan Krueger's ICECREME example on this site)

There is a TEST button that executes a VBScript using the contents of SERVERS_SELECTED. The script works fine when using the test button.

PROBLEM:

When I try and run the same two CA's during the execute sequence, the contents of the ListBox table with a property of SERVERS_SELECTED has disappeared (Record is NULL).

I am trying to do something that can't be done. (Thinking about the "TEMPORARY" word in the script)? Or is there another CA somewhere that clears out the contents of the ListBox, before the code is executed?

Many thanks for any help in advance.

Thanks

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 July 2006 - 09:44

I really don't know. Why do you need the ListBox table in the Execute sequence in the first place?

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 23 July 2006 - 09:23

The UI Sequence and Execute sequence don't use the same instance of the database. Even private properties lose their new values.

The typical workaround is to copy the contents of the listbox into a public property, like "Item1<Tab>Item2<Tab>Item3". Note that public properties have names without lower case characters.
If the listbox got too much information, you can consider to store the information in a temp file, and give a public property the name of that temp file.