Excellent, thanks everyone. Drag and Drop seems to fully work now.
Tim, Mike:
I ended up just using a global variable, once in the Drop method of the
IDropTarget class and once in the filesDropped method in the MainWindow class.
[code]
def filesDropped(self):
global Files
if Files:
f = Files[0]
Files = []
else:
pass
self.after(1000, self.filesDropped)
[/code]
Thanks for everyone's help,
Alex
> Date: Tue, 29 Apr 2008 10:58:17 +0100
> From: [EMAIL PROTECTED]
> CC: python-win32@python.org
> Subject: Re: [python-win32] (no subject)
>
> Alex Denham wrote:
> > Thanks mike, i was thinking of doing something along those lines using the
> > os modules tmpfile() method.
> > Althought i'm pretty i can post custom events to the Tkinter event loop,
> > will try that first.
>
> Sorry, Alex. I've only just spotted this thread. I think what's happening is
> that, when a drag-drop
> is initiated, Windows runs in a mini-messageloop of its own, and when the
> drop event occurs,
> you're still in that loop. I'm not sure how that will interract with whatever
> Windows messageloop
> Tkinter's running on your behalf. The normal thing would be to post some kind
> of message
> asynchronously, allowing your drop code to complete and the app's messageloop
> can then
> kick back in and see the message you posted. (waves hands about)
>
> TJG
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
_________________________________________________________________
Be a superhero and win! Play the Iron Man Mashup Game
http://www.ironmanmashup.co.uk
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32