Return the function for the operation, or None. Deleting the instance attribute unmasks the class attribute.
(self, operation)
| 79 | return OriginalCommand(self, operation) |
| 80 | |
| 81 | def unregister(self, operation): |
| 82 | '''Return the function for the operation, or None. |
| 83 | |
| 84 | Deleting the instance attribute unmasks the class attribute. |
| 85 | ''' |
| 86 | if operation in self._operations: |
| 87 | function = self._operations[operation] |
| 88 | del self._operations[operation] |
| 89 | try: |
| 90 | delattr(self.widget, operation) |
| 91 | except AttributeError: |
| 92 | pass |
| 93 | return function |
| 94 | else: |
| 95 | return None |
| 96 | |
| 97 | def dispatch(self, operation, *args): |
| 98 | '''Callback from Tcl which runs when the widget is referenced. |