From 788817c48df5bd229791d1620002e59c638a7b4c Mon Sep 17 00:00:00 2001 From: Stephen Tomkinson Date: Tue, 18 Aug 2020 11:41:16 +0100 Subject: [PATCH] Ensure OnDropFiles function matches interface Fixes the following error printed to the console after dropping a file onto a text box: TypeError: invalid result from FileDrop.OnDropFiles(), a 'bool' is expected not 'NoneType' --- gooey/gui/util/filedrop.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gooey/gui/util/filedrop.py b/gooey/gui/util/filedrop.py index 460809d..abb64b3 100644 --- a/gooey/gui/util/filedrop.py +++ b/gooey/gui/util/filedrop.py @@ -8,3 +8,4 @@ class FileDrop(wx.FileDropTarget): def OnDropFiles(self, x, y, filenames): for name in filenames: self.window.WriteText(name) + return True