Re: [python-win32] Creating python com objects

2008-04-25 Thread Alex Denham
Thats excellent Tim, I was just about to start digging around for information on how to get the data once it's dropped. Thanks for your help Alex > Date: Fri, 25 Apr 2008 17:16:34 +0100 > From: [EMAIL PROTECTED] > CC: python-win32@python.org > Subject: Re: [python-win32] Cr

Re: [python-win32] Creating python com objects

2008-04-25 Thread Tim Golden
Well, for those of you still watching this show (!) and just in case anyone comes along in the future with the same question, I attach below a small working example which will accept one or more files dropped onto its Window. It doesn't do anything with the files, bar pull their names from the rel

Re: [python-win32] Creating python com objects

2008-04-25 Thread Alex Denham
I've had a look at the example and i can't quite pick out what's being done differently other than pythoncom.WrapObject() is being called within a class and it's being called on the class it's in? Or is it something to do with the arguments passed to wrap object? Thanks for the help. Alex > Fro

Re: [python-win32] Creating python com objects

2008-04-24 Thread Alex Denham
programming in general. Thanks Tim, and everyone else on the mailing list. Alex > Date: Thu, 24 Apr 2008 20:28:42 +0100 > From: [EMAIL PROTECTED] > CC: python-win32@python.org > Subject: Re: [python-win32] Creating python com objects > > Alex Denham wrote: > > > >

Re: [python-win32] Creating python com objects

2008-04-24 Thread Tim Golden
Alex Denham wrote: Thanks Tim, the program actually reacts when something is dragged over (much better than before). However i'm receiving an error everytime. >>> pythoncom error: Unexpected exception in gateway method 'DragEnter' : DragEnter pythoncom error: Unexpected gateway error I've

Re: [python-win32] Creating python com objects

2008-04-24 Thread Alex Denham
in the documentation it says: Drop(pDataObj, pt, dwEffect) Parameters pDataObj : PyIDataObject * How do i link the IDataObject to the IDragTarget? Thanks Alex > Date: Thu, 24 Apr 2008 12:11:12 +0100> From: [EMAIL PROTECTED]> CC: > python-win32@python.org> Subject:

Re: [python-win32] Creating python com objects

2008-04-24 Thread Tim Golden
Alex Denham wrote: class PyIDropTarget: _public_methods_ = ['DragEnter', 'DragOver', 'DragLeave', 'Drop'] _reg_progid_ = "Python.PyIDropTarget" _reg_clsid_ = '{0122---C000-0046}' def DragEnter(self, args=None): print 'DragEnter: ', args def DragOver

Re: [python-win32] Creating python com objects

2008-04-24 Thread Alex Denham
ah thanks very much, initially i had a unique GUID however i got giddy and excited when i found 'PyIDropTarget' in one of the modules, unfortunatly it was just an id (i thought it was an object) I'm working my way through python programming on win32, do you know of any other material i can work

Re: [python-win32] Creating python com objects

2008-04-24 Thread Alex Denham
class PyIDropTarget: _public_methods_ = ['DragEnter', 'DragOver', 'DragLeave', 'Drop'] _reg_progid_ = "Python.PyIDropTarget" _reg_clsid_ = '{0122---C000-0046}' def DragEnter(self, args=None): print 'DragEnter: ', args def DragOver(self, args=None):

Re: [python-win32] Creating python com objects

2008-04-23 Thread Alex Denham
p. Thanks Alex From: [EMAIL PROTECTED] Date: Wed, 23 Apr 2008 07:33:16 -0400 To: python-win32@python.org Subject: Re: [python-win32] Creating python com objects I might be greatly misinterpreting what you're trying to do here, but RegisterDragDrop registers a window, not

Re: [python-win32] Creating python com objects

2008-04-23 Thread Dahlstrom, Roger
I might be greatly misinterpreting what you're trying to do here, but RegisterDragDrop registers a window, not a com object. The drop target instance would be associating the target with that particular window. Have you checked out wxDropTarget? From: [EMAIL