Hello guys, I am migrating a script from Deadline 5 to Deadline 6.1 and I am having an issue with a combo box. I have looked through the docs, but could not find the help I was looking for. I was hoping to find a list of controls that are used with some definition, but most of the examples are in very basic scripts that do not always provide an in depth explanation or an extended/advanced use. (Which would be great)
I have a combo box which I need to populate with keys from a dictionary. In Deadline 5, it is written like this:
blobList = { “blob 1”: “C:\desktop\blob1.exe”, “blob 2”: "C:\desktop\blob2.exe, “blob 3”: “C:\desktop\blob3.exe” }
theVersion = “2.1.0”
scriptDialog.AddRow()
theArray = blobList.keys()
theArray.sort()
theString = ‘,’.join( str( i ) for i in theArray )
theCmndCode = StringUtils.FromCommaSeparatedString( theString, False )
Command = scriptDialog.AddComboControl( "blobList ", “ComboControl”, theVersion, ( theCmndCode ), 150, -1 )
Command.ValueModified += CommandChanged
scriptDialog.SetEnabled( “theList”, False )
scriptDialog.EndRow()
but in Deadline 6 when I have changed the code in line with what is available in the documentation, it does not work
blobList = { “blob 1”: “C:\desktop\blob1.exe”, “blob 2”: "C:\desktop\blob2.exe, “blob 3”: “C:\desktop\blob3.exe” }
theVersion = “2.1.0”
scriptDialog.AddRow()
theArray = blobList.keys()
theArray.sort()
theString = ‘,’.join( str( i ) for i in theArray )
theCmndCode = StringUtils.FromCommaSeparatedString( theString, False )
Command = scriptDialog.AddComboControl( "blobList ", “ComboControl”, theVersion, ( theCmndCode ), 150, -1 )
Command.ValueModified.connect( CommandChanged )
scriptDialog.SetEnabled( “theList”, False )
scriptDialog.EndRow()
The example script only shows putting a string list in as the items for the drop down (comboControl) but our code does create an array of the dictionary keys, which should work. examplescript snippet:
scriptDialog.AddComboControl( “ComboBox”, “ComboControl”, “2008”, ( “2007”, “2008”, “2009”, “2010”, “2011” ), dialogWidth - labelWidth - 24 - 200, -1 )
Any pointers welcome.
Also, if I have missed something in the docs, please point me towards it. Its going to be one of those fundamental things I have overlooked in the script.
many thanks.