diff options
Diffstat (limited to 'pysamples/paste_to_heap.py')
-rw-r--r-- | pysamples/paste_to_heap.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pysamples/paste_to_heap.py b/pysamples/paste_to_heap.py index a7f67f9..cd36732 100644 --- a/pysamples/paste_to_heap.py +++ b/pysamples/paste_to_heap.py @@ -21,8 +21,12 @@ # This procedure is invoked when the user-definable block on the "extras" # palette is selected. +# Usage: Import this code into a Python (user-definable) block; when +# this code is run, the contents of the clipboard will be appended to +# the FILO heap. -def myblock(lc, x): # ignore second argument + +def myblock(tw, x): # ignore second argument ########################################################################### # @@ -36,5 +40,5 @@ def myblock(lc, x): # ignore second argument text = Clipboard().wait_for_text() if text is not None: for val in data_from_string(text): - lc.heap.append(val) - lc.update_label_value('pop', val) + tw.lc.heap.append(val) + tw.lc.update_label_value('pop', val) |