[comp.sys.amiga] Workbench \"Bug\"/Extended Selection

rmeyers@tle.dec.com (Randy Meyers 381-2743 ZKO2-3/N30) (04/25/87)

A few days ago, Godfrey Lee of Cognos Incorporated reported a suspected
Workbench bug:

>Do the following: hold down shift key, click left mouse button on a drawer,
>hold down left mouse button on a second drawer, drag mouse (the two icons will
>move together), let go of left mouse button, let go of shift key.
> 
>The "snooze" mouse icon comes on, and suddenly, the first drawer icon
>disappears, then a error comes up on the WB title line about an error
>encountered while doing the "whatever" on the second drawer.

This is not a bug, it's a feature.  Godfrey used extended selection to
move several files into a new drawer.

Some background on extended selection is in order.  The only reference
to extended selection in the "Introduction to Amiga" describes it as
a way to snapshot a group of files at once.  Most people therefore think
that the only use of extended selection is to choose files to be snapshot.
It isn't.  Extended selection is a way to choose a group of files in order
to operate on all the files in the group at once.

For example, if you select a group of drawers and select the "Open" menu
item, the workbench will open windows for each of the drawer.

If you select a group of files and select the "Discard" menu item, all of
the selected files will be discarded.

If you select a group of files, and while holding down the left mouse button
drag the files into a new window, the Workbench will move all the selected
files into the new window.  The target window, drawer, or disk for the move
is the target window, directory, or disk that the mouse pointer was over
when the left mouse button was released.  This is an important rule.  When
you are moving a set of files using extended selection, all of the icons
for the files follow the pointer.  When there are many files selected and
their icons are spread apart, not all of the images will be be over the
proper target when you release the left mouse button.  Do not worry, all
of the files will be moved to the target the mouse pointer was over when
the left mouse button was released.

This last use of extended selection (the ability to move a group of files
at once to a new target) is what Godfrey was unknowingly using (not his
fault: its not documented!).

Godfrey's "bug" cannot be duplicated using the exact method he describes.
If you select a group of drawers using extended selection, and then move
the icons inside of the same window, and release the left mouse button
over an empty spot in the window, the icons for the selected files are
just moved inside of the window.   The selected icons simply move inside
of their window the same relative offset from their old position to their
new position as the relative offset from the old position to the new
position of the icon that the mouse pointer was over when you dragged
everything around.

If, or course, the pointer was over the icon for a drawer when the left
mouse button was released, all of the selected files are renamed into
that drawer (assuming the target drawer was on the same volume, otherwise
the Workbench would copy the files into the target drawer).

Later in Godfrey's message, he mentions that this problem occurred when
he was getting ready to perform a snapshot.  What I suspect happened was
that as he holds down the shift key during the entire snapshoting process.
After selecting the icons to be snapshot, he accidentally presses the
left mouse button and drags all the icons a little bit.  Noticing that
all the icons have jumped, and since he has not released the left mouse
button yet, he decides to reposition the floating icons back over the
copies of their old images which are stationary.  He moves the floating
icons over their old images, and releases the left mouse button.  What
the Workbench sees is that the user selected a bunch of files, dragged
them to a drawer, and released them.  It then proceeds move the selected
files into the drawer.

> ... then a error comes up on the WB title line about an error
>encountered while doing the "whatever" on the second drawer.

The error that Godfrey got was "Error while moving <target drawer>: 202".
(<target drawer> was of course, the name of the target drawer.)  AmigaDOS
error message 202 is "object in use".  This is the error code you get
whenever you try and rename a directory into itself.

Note that Godfrey must *not* have moved the icons by positioning the mouse
over the last icon he had selected and then dragging.  He must have put
the mouse over a icon selected earlier in the extended selection process.
As long as the last icon selected is used to move the extended selection,
the Workbench allows you to move a group of icons back to their original
position without the Workbench considering this to be an attempt to move
the files.

Extended selection can also be used to process a project with a tool
other than its default tool.  For example, you can select a project,
hold down the shift key, and then double click on a tool.  The Workbench
will run the tool, and pass the selected project as an argument to
the tool.  Likewise, multiple arguments may be passed to a tool for
processing using extended selection.
----------------------------------------
Randy Meyers, not representing Digital Equipment Corporation

	USENET:	{decwrl|decvax|decuac}!tle.dec.com!rmeyers
	ARPA:	rmeyers%tle.dec.com@decwrl.dec.com

mb@munnari.oz (Michael Bednarek) (04/27/87)

In article <9482@decwrl.DEC.COM>
rmeyers@tle.dec.com (Randy Meyers 381-2743 ZKO2-3/N30) writes:
>This is not a bug, it's a feature.  Godfrey used extended selection to
>move several files into a new drawer.

Thank you very much for your illuminating documentation.

I also found that this feature can be used to re-order a cluttered WB window.
Move all icons out of the window on the screen. "Extend Select" all of them
and drag them to their parent icon (usually the disk). This will produce
a window with no icons overlapping but of course not necessarily in your
preferred arrangement.

cmcmanis@sun.UUCP (04/28/87)

In article <1587@munnari.oz>, mb@munnari.oz (Michael Bednarek) writes:
< I also found that this feature can be used to re-order a cluttered WB window.
< Move all icons out of the window on the screen. "Extend Select" all of them
< and drag them to their parent icon (usually the disk). This will produce
< a window with no icons overlapping but of course not necessarily in your
< preferred arrangement.

You can also select the 'parent' of the open window (like the drawer icon
or the disk icon) then select the 'Cleanup' option in the workbench menu.
Voila, all of your icon's are laid out in a sort of non overlapping way.


-- 
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These views are my own and no one elses. They could be yours too, just
call MrgCop() and then ReThinkDisplay()!

glee@cognos.uucp (Godfrey Lee) (05/01/87)

Thank you for a detailed description of how extended selection works, and 
what actually happened to me. I am not sure that I did position the cursor
over *not* the last icon selected, but I will take your word for it.

However, I still think it is a bug. Moving a bunch of things into a drawer that
is part of what is selected still does not make sense, I can't think of an
instance where this is useful to someone. If the code goes to the trouble of
checking whether the user is trying to put into the last drawer, why not check
for all drawers? C-A?

-- 
-----------------------------------------------------------------------------
Godfrey Lee, Cognos Incorporated, 3755 Riverside Drive,
Ottawa, Ontario, CANADA  K1G 3N3
(613) 738-1440		decvax!utzoo!dciem!nrcaer!cognos!glee