[Wxruby-users] dnd

Kevin Smith wxRuby at qualitycode.com
Sun Dec 7 20:16:24 EST 2003


This code has been checked in. I added the two sample apps to the 
samples/etc directory.

I couldn't get the file drop sample to work with any apps on my system, 
but the text drop sample worked fine. I don't think I have any apps that 
allow file drags.

I did make a couple changes to what Gergely submitted:

1. I updated the samples to define on_init instead of OnInit. All of the 
samples have now been updated to reflect the current naming convention.

2. The submitted code would raise an exception if the ruby callback 
(on_drop_file or on_drop_text) returned anything other than the ruby 
true or false values.

I think the ruby way is to treat false and nil as false, and anything 
else as true. I am open to arguments for why we should be more 
restrictive in this particular case. But for now I changed it to allow 
return values other than just true or false.

Cheers,

Kevin


KONTRA Gergely wrote:
> Hi!
> 
> Attached files to get DnD work.
> 
> Gergo


More information about the wxruby-users mailing list