Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Limit on number of calls to Transfer.registerType ?
Limit on number of calls to Transfer.registerType ? [message #436036] Mon, 10 May 2004 09:35
Eclipse UserFriend
Originally posted by: jeppenm.worldonline.dk

Hi,

I'm implementing dnd in our editor an have a few questions as to the
general best way to handle the following:

1) It should be possible to copy, but not move, editor elements from
one instance to another (i.e. two different source files)

2) Within a single editor, there are constraints on which objects can
be dropped on which objects.

I see two possible solutions:

a) Create a single Transfer subclass for all operations and handle the
above constraints in the drop() method. This is what I have now and
it works. But the drawback of this is, that there is no visible
feedback when dragging over elements that doesn't support the
dragged element or trying to move elements to another instance.

b) Create a Transfer subclass for each distinct source & target object
type and a Transfer subclass for each editor instance. By combining
these transfer classes it seems possible to provide the correct
visual feedback when dragging.

The questions are thus: is there a better way to handle the above
cases. If b) is the best method, is there a limit to the number of
calls to registerType? I believe yes, since an int is returned an
we'll eventually run out of unique ids, the questions is then what is
the limit. Is it possible to unregister a type (i.e. when closing an
editor instance)?

rgds
Jeppe
Previous Topic:JFace Action causing error
Next Topic:swt-opengl document
Goto Forum:
  


Current Time: Wed Sep 25 02:05:13 GMT 2024

Powered by FUDForum. Page generated in 0.02948 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top