Hi,
In a monitor script how would I take the contents of a nested 2x array and populate the first entry into a string list for display in a ComboControl and take the second entry in the array and populate it into a textControl. The idea being that as a user selects a particular entry in the ComboControl, the textcontrol updates with the corresponding array entry. Here’s some example code of what I am trying to achieve!
[code]import sys
from System.IO import *
from Deadline.Scripting import *
########################################################################
Globals
########################################################################
scriptDialog = None
########################################################################
Main Function
########################################################################
def main ( *args ):
global scriptDialog
dialogWidth = 450
Need Code[x] to be for each FIRST entry in the array as listed below under “##Source Code”
scriptDialog.AddComboControl( "Command", "ComboControl", "", (Code[x][1]), dialogWidth - 10, -1 )
Again, need Code[x] to be for each SECOND entry in the array as listed below…
scriptDialog.AddControl("CommandCode","TextControl",(Code[x][2]),dialogWidth - 10, -1)
########################################################################
Source
########################################################################
Code = (
( “A”, “A_command” ),
( “B”, “B_command” ),
( “C”, “C_command” ),
)[/code]
So far, the ComboControl wants to be fed a nice comma separated list for its entries, so I need to convert the array accordingly to suit this. Some help would be much appreciated!
Thanks,
Mike