Thread: [Fxruby-users] drag and drop with mozilla
Status: Inactive
Brought to you by:
lyle
From: Peter S. <pet...@gm...> - 2004-06-23 23:22:45
Attachments:
dndtest.rb
|
Hi I'm a ruby und fx beginner and am looking for the "ultimate" widget set ;-) I was trying to write a simple application that stores some bookmarks. But I'm not able to get the attached samplecode (I found on the INet) to run. The DROP event is never called. Is the error between my ears or is this some restriction to fx (DnD just between fx proggs)? Another question: I read that DnD on Windows is not supported (and will maybe never be), can you confirm this? Thank's for your help -- Peter Schrammel **************** Support the ASCII Ribbon Campaign ***************** *** /"\ * use fixed-width fonts when displaying email **** *** \ / * cease sending HTML code in email **** *** X * desist from attaching proprietary application formats **** *** / \ * use signature files instead of vCard file attachments **** **PLEASE*PLEASE*PLEASE*PLEASE*PLEASE*PLEASE*PLEASE*PRETTY*PLEASE**** |
From: jeroen <je...@fo...> - 2004-06-24 01:57:28
|
On Wednesday 23 June 2004 06:24 pm, Peter Schrammel wrote: > Hi > > I'm a ruby und fx beginner and am looking for the "ultimate" widget set ;-) > > I was trying to write a simple application that stores some bookmarks. > But I'm not able to get the attached samplecode (I found on the INet) to > run. The DROP event is never called. Is the error between my ears or is > this some restriction to fx (DnD just between fx proggs)? On X11, we do XDND, which is now pretty much entrenched as the standard. I've dragged and dropped between Qt and GTK, so its pretty safe to say it works. On Windows, drag and drop is between FOX applications only. > Another question: I read that DnD on Windows is not supported (and will > maybe never be), can you confirm this? Not supported between FOX and non-FOX apps, but supported between FOX apps, in a portable way. It is impossible to implement it in a portable way, due to the way COM is designed. You *can* implement it in a non- portable way, see COM_Example.zip. [Note that this is C++ code]. Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 21:40 06/23/2004 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ |
From: Lyle J. <ly...@kn...> - 2004-06-24 07:30:40
|
On Jun 23, 2004, at 6:24 PM, Peter Schrammel wrote: > I was trying to write a simple application that stores some bookmarks. > But I'm not able to get the attached samplecode (I found on the INet) > to run. The DROP event is never called. Is the error between my ears > or is this some restriction to fx (DnD just between fx proggs)? You say that you never get the SEL_DND_DROP message. Did it ever get the initial SEL_DND_MOTION messages (which would have come first)? > Another question: I read that DnD on Windows is not supported (and > will maybe never be), can you confirm this? See Jeroen's response. |
From: Peter S. <pet...@gm...> - 2004-06-24 14:46:14
|
Lyle Johnson wrote: > > On Jun 23, 2004, at 6:24 PM, Peter Schrammel wrote: > You say that you never get the SEL_DND_DROP message. Did it ever get the > initial SEL_DND_MOTION messages (which would have come first)? > Yes I get a lot of SEL_DND_MOTION text/x-moz-url _NETSCAPE_URL text/unicode text/plain text/html lines. So it seems to work. Perhaps there's something wrong with the ruby glue. > See Jeroen's response. Thanks...got that. It's rather disappointing...I need DnD on Linux/Win and Mac (if possible). And I can't rewrite mozilla or ie to be a fox app. -- Peter Schrammel **************** Support the ASCII Ribbon Campaign ***************** *** /"\ * use fixed-width fonts when displaying email **** *** \ / * cease sending HTML code in email **** *** X * desist from attaching proprietary application formats **** *** / \ * use signature files instead of vCard file attachments **** **PLEASE*PLEASE*PLEASE*PLEASE*PLEASE*PLEASE*PLEASE*PRETTY*PLEASE**** |
From: Lyle J. <ly...@kn...> - 2004-06-25 01:06:54
|
On Jun 24, 2004, at 9:48 AM, Peter Schrammel wrote: > Yes I get a lot of > SEL_DND_MOTION > text/x-moz-url > _NETSCAPE_URL > text/unicode > text/plain > text/html > lines. So it seems to work. Perhaps there's something wrong with the > ruby glue. In your example program that you sent, you're only accepting drops for the FXWindow.urilistType: if offeredDNDType?(FROM_DRAGNDROP, FXWindow.urilistType) acceptDrop end and the MIME type for that drag type is: $ ruby -e "require 'fox'; puts Fox::FXWindow.urilistTypeName" text/uri-list You listed a number of drag types that Mozilla is apparently offering (e.g. "text/x-moz-url", "_NETSCAPE_URL", etc.) but this is not one of the formats you listed. So in other words, you haven't accepted drops for any of the flavors of data that Mozilla's prepared to offer. See what happens if you also accept drops for, say, "text/plain" -- which FOX assigns to FXWindow.textType (and FXWindow.textTypeName). > Thanks...got that. It's rather disappointing...I need DnD on Linux/Win > and Mac (if possible). And I can't rewrite mozilla or ie to be a fox > app. Sure, I understand. For what it's worth, I have the feeling you can get this working with Mozilla on Linux just fine. |