Thanks for the replies so far as they've been helpful (I think).
Here's my VB.Net Code, but its blowing up with a 1723 Error. The action is
schedule as Immediate Execution.
Public Shared Function GetSites(ByVal session As Session) As ActionResult
Dim recListBox As Record
Dim intIndex As Integer
Dim sqlView As View
Dim strTest As String() = {"One", "Two", "Three"}
Try
session.Log("Populating Web Stite List...")
sqlView = session.Database.OpenView("SELECT * FROM 'ListBox'")
sqlView.Execute()
For intIndex = LBound(strTest) To UBound(strTest)
recListBox = session.Database.CreateRecord(4)
recListBox.SetString(1, "WEBSITECHOICES2")
recListBox.SetInteger(2, intIndex + 1)
recListBox.SetString(3, strTest(intIndex))
recListBox.SetString(4, strTest(intIndex))
sqlView.Modify(ViewModifyMode.InsertTemporary, recListBox)
Next
sqlView.Close()
session.Log("Web Site List populated successfully.")
'Everything good...
Return (ActionResult.Success)
Catch ex As Exception
session.Log("Error: There was a problem populating web site
list.")
Return (ActionResult.Failure)
End Try
End Function
Does it matter that I don't have any records seeded in my ListBox table at
build-time? I thought I may have read somewhere that someone built with a
dummy record in the table, deleted then added the new temp records. ??
Any further help would be greatly appreciated!!
From: Matt Walker [mailto:[email protected]]
Sent: Monday, August 08, 2011 4:07 PM
To: '[email protected]'
Subject: Populating a ListBox At Runtime - VB.NET Custom Action Project...
I don't know if I'm on the right path, but maybe someone can help me.
I'm
currently using InstallShield, but have dabbled in WiX a bit.
I'm trying to creat a custom action using the WiX VB.NET custom action
project type in VS 2010. Eventually this custom action will query the
target
system for existing web sites by name and populate a combo box for
selection, but for now, I just have an array of values that I want to
shove
into the listbox just to see that I have working code.
The associated property on my listbox is WEBSITECHOICES and I know that
I
have to get the choices into the listbox table, but that is where I hit
the
wall. I've tried so much that my head is spinning. Does someone out
there
have a VB.Net code snippet of how to use the Session.OpenView, etc to
populate this table with my array values?
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users