--- 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