[python-win32] (no subject)

Alex Denham a1eio at hotmail.com
Sat Apr 26 12:04:21 CEST 2008


Hi all,

I'm just wondering but when i try to access/update anything on my Tkinter GUI from one particular function, my whole program crashes/freezes with no error.

The function is part of a class which handles all the GUI drawing/event handling etc.
The function in question gets called from a win32 DesignatedWrapPolicy class. Sample code below:

[code]
    # this function is part of an IDropTarget class, the TargetWidget was definined in the __init__ method of this functoin and it points to my class which handles the GUI.
    def Drop(self, data_object, key_state, point, effect):
        data = data_object.GetData((15, None, 1, -1, 1))
        print data
        n_files = shell.DragQueryFileW(data.data_handle, -1)
        print n_files
        filenames = [shell.DragQueryFileW(data.data_handle, n_file) for n_file in range(n_files)]
        print filenames
        self.TargetWidget.filesDropped(filenames) # this calls the filesDropped function of the TargetWidget class and passes the filename list to it.

    # this function is part of the GUI class (which inherits from Tkinter.Toplevel) the print commands work however if i uncomment the clearInput function (which just calls self.filepathInput.delete(0, END) to clear the text)
    # the program hangs, same for the second commented line, and anything else that requires a call to tk it appears. Is there some sort of conflict going on between win32 and Tk ??
    def filesDropped(self, fileList):
        print fileList
#        self.clearInput()
#        self.filepathInput.insert(Tkinter.END, fileList[0])
[/code]

I'm just wondering if there's something i need to do to 'release' the GUI?
I'm pretty sure it's got nothing to do with my code elsewhere because it was all working smoothly before, and if i call the filesDropped function from somewhere else (not from the IDropTarget class) i don't have any issues.

Thanks in advance,
Alex

_________________________________________________________________
Be a superhero and win! Play the Iron Man Mashup Game 
http://www.ironmanmashup.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080426/e4c8c5fd/attachment.htm>


More information about the python-win32 mailing list