On 3/19/07, Raj Sahae <rajsahae at gmail.com> wrote:> half the time, when I DND, it doesn''t drop unless I click the mouse > button. When I changed my code to use the _id2ref advice you gave me, > that extra click started giving me seg fault problems. I''m still > searching for the cause to that, but I noticed that if I select the > button, right click, then drag it, I don''t have to click to drop it, and > I also don''t seg fault. Have you ever seen a problem like this before, > and do you know why the DND isn''t working properly?I have not heard of a problem like this. Are you seeing a similar problem with the drag & drop examples included with the FXRuby distribution?
On 3/21/07, Raj Sahae <rajsahae at gmail.com> wrote:> I was just thinking, all my dropsites are also buttons with SEL_COMMAND > connections. Would that interfere in the dropping somehow? Did you > recieve my previous email with the code attachment?I don''t have to debug your program for you, but a button is admittedly an odd choice to associate with drag and drop. At least, I don''t recall ever seeing anyone make that association (even in non-FOX applications). But yes, if you''re messing around with the default SEL_LEFTBUTTONPRESS and SEL_LEFTBUTTONRELEASE handlers (as you must when doing drag and drop) that''s almost certainly going to break the SEL_COMMAND handling -- because SEL_COMMAND depends on seeing a button press and release. I''d recommend associating the D&D with some kind of widget that isn''t something you typically click on, like maybe a label, or an FXImageFrame -- something like that.