[squeak-dev] The Trunk: Tools-ct.1126.mcz

christoph.thiede at student.hpi.uni-potsdam.de christoph.thiede at student.hpi.uni-potsdam.de
Fri Mar 25 19:47:51 UTC 2022


Hi Chris,

sorry for the late reply!

> Please simply retain the dirty contents of each mode's pane rather than introduce another use interruption.

I don't understand. That won't be possible for the contents of the value pane because there is no equivalent in the explorer, is it? :-)

Regarding your proposal of always popping up a new window in this case, I am not sure ... So you want the semantics of a message trace that is trying to insert new messages here? To me, this "explore" button has different semantics: That is not a pop-up, it just replaces the contents of the existing window. I believe that it would less inconsistent if this sometimes opened a new tool and sometimes not ...

Can we have some third opinions, maybe? :)

Best,
Christoph

---
Sent from Squeak Inbox Talk

On 2022-02-07T19:25:18-06:00, asqueaker at gmail.com wrote:

> Christoph,
> 
> Please simply retain the dirty contents of each mode's pane rather than
> introduce another use interruption.
> 
> Otherwise, I would like to at least make this conditional on Reuse Windows
> not being set.  Reuse Windows reinforces the behavior throughout the system
> that new windows are opened when pane contents cannot be changed due to
> being dirty, so it would be good to keep that behavior consistent here.
> The newly-opened window IS the "pop up" that enables the user to preserve
> their contents AND continue working, unfettered.
> 
> Best,
>   Chris
> 
> On Sun, Feb 6, 2022 at 2:24 PM <commits at source.squeak.org> wrote:
> 
> > Christoph Thiede uploaded a new version of Tools to project The Trunk:
> > http://source.squeak.org/trunk/Tools-ct.1126.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Tools-ct.1126
> > Author: ct
> > Time: 6 February 2022, 9:24:10.500919 pm
> > UUID: 95ff44c7-b6bf-0e46-b8e4-4d261c4c3806
> > Ancestors: Tools-mt.1125
> >
> > Fixes a bug when switching to an explorer from an inspector that has
> > unaccepted contents in the value pane. Rather than replacing the value of a
> > field (or even replacing the inspected/explored object), ask the user and
> > either withdraw these contents or open a new window for the explorer.
> >
> > Note that I consider this patch rather a temporary hotfix than a final
> > solution. In the long term, we should try to communicate specific selectors
> > (here: #expression) for requests such as #acceptChanges or #wantToChange
> > instead.
> >
> > =============== Diff against Tools-mt.1125 ===============
> >
> > Item was changed:
> >   ----- Method: Inspector>>replaceInspectorWithExplorer (in category
> > 'toolbuilder') -----
> >   replaceInspectorWithExplorer
> >         "Switch to an explorer tool. If there are custom fields, the user
> > can choose to not discard them, which will just spawn a new explorer tool
> > besides this inspector."
> >
> >         | window currentBounds |
> > +       self flag: #todo. "ct: In the long term, we should try to
> > communicate specific selectors (here: #expression) along the observer
> > pattern for requests such as #acceptChanges or #wantToChange instead of
> > exploiting contentsTyped etc."
> > +
> > +       (self okToDiscardCustomFields and: [contentsTyped notNil ==> [self
> > confirm:
> > + 'Changes have not been saved.
> > + Is it OK to cancel those changes?' translated orCancel: [^ self]]])
> > -       self okToDiscardCustomFields
> >                 ifFalse: [^ self object explore].
> >
> >         self customFields removeAll.
> > +       self changed: #contents. "Reset value pane contents before
> > accepting all contents"
> >         self changed: #acceptChanges. "We copy the current state anyway.
> > See below."
> >         currentBounds := ToolBuilder default class getBoundsForWindow:
> > self containingWindow.
> >
> >         "Close first because MVC fiddles around with processes."
> >         self changed: #close.
> >
> >         window := ToolSet explore: self object.
> >
> >         "---- In MVC, the lines after this will not be executed ---"
> >
> >         window model setExpression: self expression.
> >         ToolBuilder default class setBoundsForWindow: window to:
> > currentBounds.!
> >
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220207/1464aa7b/attachment.html>
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220325/e65fa239/attachment.html>


More information about the Squeak-dev mailing list