[ENH] BrowserWithDragAndDrop (> Take a look! <)

Stephan Rudlof sr at evolgo.de
Fri May 5 15:07:44 UTC 2000


Jerry,

JArchibald at aol.com wrote:
> 
> => 5/4/00 10:14:20 PM, sr at evolgo.de =>
> << here is version 0.6 of the standard browser with drag&drop functionality.
> >>
> 
> Stephan,
> 
> This is really nice.

:-))

> Though I haven't been following closely the emerging
> discussions on drag and drop facilities within Squeak (I have paid more
> attention to the interest (or sanity, by detractors) of drag and drop within
> MVC), I had fairly clear idea of what I thought drag and drop should be
> capable of from prior experience of mine trying to define drag and drop
> within OS/2 and long usage in Team/V within Visual Smalltalk Enterprise. I
> had a lot of fun trying different possibilities within a Squeak.2052 image.
> 
> A few observations:
> 
> 1.) The facility requires a Morphic project. That was not in the instructions
> (sorry, some of us retrogrades still work within MVC projects).

I have written in the preamble of the changeset:
	Precondition: Morphic, Squeak 2.7
. What kind of description do you suggest instead?

> 
> 2.) The animation is delightful. It is particularly effective when the drag
> target is not legitimate, and the animation pleasantly 'sucks' the drag
> source back to its source pane (so much better than an error message). I also
> like the manner in which the animation 'follows' the target to the target
> pane. I thought it was much more evocative than having 'blinking' or some
> such in target pane.

I'm happy about this. I wanted to visualize the difference between move
and copy semantic in a manner, that the user intuitively knows what
happens (or not). The animation has taken quiet a long time to work
correctly: But know it works forked, so that the user is able to work
*while* it is running... ;-) . Should be especially good for slow
machines.

> 
> 3.) I was particularly impressed with the correct functioning of the drag &
> drop between Method Category Browsers under the same Class. I didn't push
> this too far, but what I did test did correctly work.
> 
> 4.) There seem to be method drag and drop cases between classes which would
> fail. I'm
> not sure what the rule is? The case which seems to fail is dragging #min:
> from class Magnitude to Date. Some other cases seemed to work.

Squeak hangs if you try to do this. I think this is, because #min: in
Magnitude is essentially for the system: if you move it to Date, it
diminishes in Magnitude (move semantic)... Copy semantic works though!

But while looking for a possible problem here (I don't think ,there is
any) I've found and fixed a real bug (see other '[ENH][FIX]
BrowserWithDragAndDrop' mail).

> 
> 5.) Certain methods from this ChangeSet have 'color' annotations (even when
> in MVC project). E.g.,
> Browser>>changeCategoryForClass:srcSystemCategory:atListMorph:internal:copy:
> (and several others) but most do not. What is the history of these methods
> that they have such colorings, and other methods do not? (sorry if this is
> common knowledge for others, perhaps minimal familiarity on my part with
> tools available in Morphic inspires this question).

There is a principle difference between drag&drop *between* two browsers
in *different* windows and drag&drop *inside* one browser in *one*
window.
Coloring is made only for dragging *inside* *one* browser. While
selecting an item in a PluggableTextMorph the browser window containing
it needs the mouse focus, which is the window where the drag starts.
If there is a drag between *different* browser windows, the already
*selected* systemCategory/class/messageCategory in the target browser
window is the target.

Background: I've found it useful to enable to drag&drop e.g. one method
after each other from one classCategory to another *inside* one browser,
without changing the source category. But how to visualize a successful
drag: by coloring the list item without selecting it!
But if you drag&drop something into another browser window, you have
mouse focus and the dragged thing selected there, what seems to be
another useful variant.

> 
> 6.) Since you had nicely written your instructions within the preamble to the
> change set (it would be nice if more did so), at some point I tried to spawn
> a separate pane containing those instructions from a Simple Change Sorter.
> Alas, spawn does not work for preambles (MVC and Morphic). This is not your
> problem, just an observation on the behavior of ChangeSorters.

It would be possible to open a workspace with the same instructions in
the postscript. But I think there aren't so many code snippets to play
with and it is a duplication.
Most important if there occurs a - to be removed - bug is
	Utilities dragNDropDomestos. 'for removal of drag&drop artifacts'
.

> 
> This is a really excellent implementation of drag and drop. I hope others
> 'stop by' and take a look at what this achieves.

Thank you for your kind words and your support.  :-))

Greetings,

Stephan

> 
> Cheers,
> Jerry Archibald.
> systemObjectivesIncorporated

-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3





More information about the Squeak-dev mailing list