[squeak-dev] Please try out | Inspector Refactoring =)

Marcel Taeumel marcel.taeumel at hpi.de
Mon Apr 27 08:35:11 UTC 2020


Hi all!

I just merged the inspector refactoring to Trunk. I'll stay tuned for issues. ;-)

Note that existing inspectors get re-opened during the update but debuggers will not. So existing debuggers will experience complaining inspectors. Please forgive this inconvenience. Try to re-start the debugging session.

Best,
Marcel
Am 26.04.2020 20:01:08 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
Yes, this sounds good :-)

Best,
Christoph
Von: Taeumel, Marcel
Gesendet: Montag, 20. April 2020 16:19:12
An: Thiede, Christoph; gettimothy via Squeak-dev
Betreff: Re: AW: [squeak-dev] Please try out | Inspector Refactoring =)
 
Hi Stef,

thank you for testing and finding this bug. I think we can just factor out #okToDiscardCustomFields from #okToClose and then trigger that confirmation manually in #replaceInspectorWithExplorer. So we can re-use the confirmation dialog and properly react to the user's decision.

Best,
Marcel
Am 18.04.2020 01:18:26 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
Hi Stef, many thanks for trying out the changeset and finding the bug! :-)

I'm not sure if there is already a better pattern to fix this, but the following patch resolved the issue for me:

Inspector > replaceInspectorWithExplorer
"Switch to an explorer tool."
| window currentBounds |
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 myDependents ifNil: [self myDependents: #()].
self changed: #close.
+  self myDependents ifNotNil: [
+  "View resisted to release, aborting"
+  ^ self].
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.

Hm, maybe we should extract this into Model >> #close ... see also the flag in Debugger >> #close for reference.
(And thinking more generally, I would like to move the whole logic somewhere into the UIManager/ToolBuilder. But that's stuff for another refactoring :-))

Best,
Christoph


Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Stéphane Rollandin <lecteur at zogotounga.net>
Gesendet: Samstag, 18. April 2020 00:58 Uhr
An: squeak-dev at lists.squeakfoundation.org
Betreff: Re: [squeak-dev] Please try out | Inspector Refactoring =)
 
> *2. Custom Fields*
>
> You can now add custom fields during your inspector session. Invoke the
> field-list menu and choose "add field..." at the bottom.

If, after having added a field, one swaps to the explorer via the
bottom-right button, a dialog appears warning that the field will be
discarded. This dialog has a 'yes' and a 'no' button, but both lead to
the same behavior: the explorer is installed.

Stef

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200427/fd8e2ed1/attachment.html>


More information about the Squeak-dev mailing list