The Inbox: Tools-mt.702.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Tools-mt.702.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Inbox:
http://source.squeak.org/inbox/Tools-mt.702.mcz

==================== Summary ====================

Name: Tools-mt.702
Author: mt
Time: 12 May 2016, 5:09:18.851775 pm
UUID: 7646ebd5-0873-e149-a688-3d1ade262772
Ancestors: Tools-bf.701

Ask before discarding changes made in the code pane in object explorers and inspectors.

Let's try this out for a while and see whether it turns out to be too annoying.

=============== Diff against Tools-bf.701 ===============

Item was changed:
  ----- Method: Inspector>>buildCodePaneWith: (in category 'toolbuilder') -----
  buildCodePaneWith: builder
  | textSpec |
  textSpec := builder pluggableCodePaneSpec new.
  textSpec
  model: self;
  getText: #expression;
  editText: #expression:;
  help: #helpText;
  selection: #contentsSelection;
+ menu: #codePaneMenu:shifted:.
- menu: #codePaneMenu:shifted:;
- askBeforeDiscardingEdits: false.
  ^textSpec!

Item was added:
+ ----- Method: ObjectExplorer>>okToChange (in category 'updating') -----
+ okToChange
+
+ self canDiscardEdits ifTrue: [^ true].
+ self changed: #wantToChange.  "Solicit cancel from view"
+ ^ self canDiscardEdits!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-mt.702.mcz

Chris Muller-3
Most of the time, Inspectors and Explorers are "hot" tools; e.g., they
are used only very briefly on any particular object, i.e., to do a
quick interrogation, then dismissed.  A confirmation prompt puts a
hurdle into that process, only to support a very rare use-case of
"Prevent user from accidently closing Inspector, in case their
interrogation code is valuable, but forgot to copy it."

As an alternative, what if we could add to the Window menu:  "Reopen
the last-closed window"?

OR, maybe something even more general:  "Reopen the last-deleted Morph"..!!  ?

Best,
  Chris

PS -- It would be nice if inspectors and explorers would behave like
Workspaces w.r.t. "Accept" and "Cancel" commands -- Cancel should
restore to the text to the state of the last Accept...

On Thu, May 12, 2016 at 10:09 AM,  <[hidden email]> wrote:

> Marcel Taeumel uploaded a new version of Tools to project The Inbox:
> http://source.squeak.org/inbox/Tools-mt.702.mcz
>
> ==================== Summary ====================
>
> Name: Tools-mt.702
> Author: mt
> Time: 12 May 2016, 5:09:18.851775 pm
> UUID: 7646ebd5-0873-e149-a688-3d1ade262772
> Ancestors: Tools-bf.701
>
> Ask before discarding changes made in the code pane in object explorers and inspectors.
>
> Let's try this out for a while and see whether it turns out to be too annoying.
>
> =============== Diff against Tools-bf.701 ===============
>
> Item was changed:
>   ----- Method: Inspector>>buildCodePaneWith: (in category 'toolbuilder') -----
>   buildCodePaneWith: builder
>         | textSpec |
>         textSpec := builder pluggableCodePaneSpec new.
>         textSpec
>                 model: self;
>                 getText: #expression;
>                 editText: #expression:;
>                 help: #helpText;
>                 selection: #contentsSelection;
> +               menu: #codePaneMenu:shifted:.
> -               menu: #codePaneMenu:shifted:;
> -               askBeforeDiscardingEdits: false.
>         ^textSpec!
>
> Item was added:
> + ----- Method: ObjectExplorer>>okToChange (in category 'updating') -----
> + okToChange
> +
> +       self canDiscardEdits ifTrue: [^ true].
> +       self changed: #wantToChange.  "Solicit cancel from view"
> +       ^ self canDiscardEdits!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-mt.702.mcz

Stéphane Rollandin
> OR, maybe something even more general:  "Reopen the last-deleted Morph"..!!  ?

+1

Stef