The "duplicate" halo handle (was Re: But...but..but..!)

Doug Way dway at riskmetrics.com
Tue Apr 24 05:37:26 UTC 2001


"Richard A. O'Keefe" wrote:
> 
> "Jim Benson" <jb at speed.net> wrote:
>         I pop up my world menu, click 'keep this menu up' and bring up the halos on
>         one of the menu items. I then duplicate the menu item using the green handle
>         and drag it over to the desktop. I dismiss the handles and the world menu. I
>         then click the button --
> 
> So of course I *had* to try this.  It *works*!  Never mind steering a racing
> car around a track (which I can't), I've *wanted* an "Open" button for ages
> and now I have one.  Squeak is such fun.

I only recently noticed (for whatever reason) that the duplicate (green) handle is really useful.

I hadn't really used it much early on... I kind of lumped it with other handles like the rotate (blue) handle, which are great for demoing how everything in Morphic can be played with, but are only really useful for certain types of morphs.

But then I was thinking one day that VisualAge has a "clone window" menu item which lets you make a copy of any browser window, keeping its current state, which is nice.  Squeak didn't have a menu item like this, but then I remembered that I could use the duplicate handle to do this!  It seems to work with most any Squeak window (SystemWindow).

This especially came in handy when I was debugging a problem in Whisker, which required a very specific set of panes to be selected in the window ahead of time in order to test, but the same window couldn't be used twice in a row for the test (I don't remember the exact problem... some sort of initialization problem perhaps), so originally I would have had to reselect everything before each test.  Anyway, instead I just selected the various panes to set up one Whisker window, and used the duplicate handle to make a copy of the window, and ran the test on each copy.  The veryDeepCopy which the duplicate operation uses worked like a charm, all the dependencies etc. were still working in the copied windows.

Later, I got even more ambitious and tried to duplicate a debugger window, hoping that it might copy the debugger context and let me debug a single problem in different ways, using a copy of the debugger.  However, this doesn't work... it eventually gets down to trying to copy a PasteUpMorph, which it won't copy.  I'm not sure if this is an intractable problem, though... it would be really cool to be able to duplicate debugger windows.

- Doug Way
  dway at riskmetrics.com





More information about the Squeak-dev mailing list