equal
deleted
inserted
replaced
50 """ |
50 """ |
51 Class that implements a generic viewer that display a list of variable values |
51 Class that implements a generic viewer that display a list of variable values |
52 This class has to be inherited to effectively display variable values |
52 This class has to be inherited to effectively display variable values |
53 """ |
53 """ |
54 |
54 |
55 def __init__(self, window, items=[]): |
55 def __init__(self, window, items=None): |
56 """ |
56 """ |
57 Constructor |
57 Constructor |
58 @param window: Reference to the Debug Variable Panel |
58 @param window: Reference to the Debug Variable Panel |
59 @param items: List of DebugVariableItem displayed by Viewer |
59 @param items: List of DebugVariableItem displayed by Viewer |
60 """ |
60 """ |
61 self.ParentWindow = window |
61 self.ParentWindow = window |
|
62 items = [] if items is None else items |
62 self.ItemsDict = OrderedDict([(item.GetVariable(), item) |
63 self.ItemsDict = OrderedDict([(item.GetVariable(), item) |
63 for item in items]) |
64 for item in items]) |
64 self.Items = self.ItemsDict.viewvalues() |
65 self.Items = self.ItemsDict.viewvalues() |
65 |
66 |
66 # Variable storing current highlight displayed in Viewer |
67 # Variable storing current highlight displayed in Viewer |