[Fwd: RE: Drag and Drop with custom data - example required]

Christian ckkart at hoc.net
Thu Mar 1 03:46:38 PST 2007


Jon Cage wrote:
>  Christian K. wrote:
>> Jon <Jon <at> digital-explosion.co.uk> writes:
>>   
>>> Started dragging
>>> Traceback (most recent call last):
>>>   File "D:\HyperLight Online\v4.0\HyperSequencer_Py\HyperGUI_v3.py", 
>>> line 142, in OnBeginDrag
>>>     dndData = DnD(text)
>>> TypeError: this constructor takes no arguments
>>>
>>> The DnD class will be a holder for the data that I'll be passing across. 
>>> I'm quite new to Python so I've probably just overlooked something.. ? 
>>> Can anyone spot it?
>>>     
>> It's due to a typo in the DnD class. It should be '__init__', not '__init_'.
>>
>> Christian
> Ooops! I'd been staring at that code for a good 30mins scratching my
> head; I suppose that's what you get for trying to code when you're tired.
> 
> I was thinking I might simplify my example a bit, add a load of comments
> and then post it somewhere as a reference for those who are as stuck as
> I was on getting started with this. Where would be the best place to
> post it or a reference to it?

The wxPython wiki is the best place to put example code: http://wiki.wxpython.org/

Christian





More information about the wxpython-users mailing list