Drag and Drop: OnDropFiles Return Argument

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Drag and Drop: OnDropFiles Return Argument

Kevin Cutts
I'm using drag and drop in wxpython 4.0.0b1 under windows 10. 
I created a subclass of wx.FileDropTarget and created my own method OnDropFiles but none of the tutorials I ran across indicate that I need to return a number from this function. However I get an error until I return a value so I assume this has changed? Can someone tell me what this return value is for? 


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Drag and Drop: OnDropFiles Return Argument

Scott Talbert
On Wed, 27 Sep 2017, Kevin Cutts wrote:

> I'm using drag and drop in wxpython 4.0.0b1 under windows 10. I created a
> subclass of wx.FileDropTarget and created my own method OnDropFiles but none
> of the tutorials I ran across indicate that I need to return a number from
> this function. However I get an error until I return a value so I assume
> this has changed? Can someone tell me what this return value is for? 

The wxPython documentation doesn't indicate this, but if you go to the
corresponding wxWidgets documentation[1], it notes that the return value
is actually supposed to be a bool indicating whether to accept the data
(true) or veto the operation (false).

[1] http://docs.wxwidgets.org/trunk/classwx_file_drop_target.html#ad4f15d965332e232a59fe985e37d48f9

Scott

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.