VariablePanel.py also depends on types.TupleType
authorb.taylor@willowglen.ca
Wed, 02 Sep 2009 14:55:22 -0600
changeset 419 8f97ed01a6a6
parent 418 a06221a0930b
child 420 c08d053b74b3
VariablePanel.py also depends on types.TupleType
VariablePanel.py
--- a/VariablePanel.py	Wed Sep 02 12:39:52 2009 -0600
+++ b/VariablePanel.py	Wed Sep 02 14:55:22 2009 -0600
@@ -23,6 +23,8 @@
 
 import wx, wx.grid
 
+from types import TupleType
+
 from PLCOpenEditor import AppendMenu
 from plcopen.structures import LOCATIONDATATYPES, TestIdentifier, IEC_KEYWORDS
 
@@ -241,7 +243,16 @@
         self.Errors = {}
 
 class VariableDropTarget(wx.TextDropTarget):
-    
+    '''
+    This allows dragging a variable location from somewhere to the Location
+    column of a variable row.
+    
+    The drag source should be a TextDataObject containing a Python tuple like:
+        ('%ID0.0.0', 'location', 'REAL')
+    
+    c_ext/CFileEditor.py has an example of this (you can drag a C extension
+    variable to the Location column of the variable panel).
+    '''
     def __init__(self, parent):
         wx.TextDropTarget.__init__(self)
         self.ParentWindow = parent