# HG changeset patch # User b.taylor@willowglen.ca # Date 1251924922 21600 # Node ID 8f97ed01a6a617008d617985cefb12770209fe4a # Parent a06221a0930b7947ab2bce78524cfd62255b0cca VariablePanel.py also depends on types.TupleType diff -r a06221a0930b -r 8f97ed01a6a6 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