[squeak-dev] Morphic question. I need to toggle the close buttons on a bunch of workspaces that are uncloseable....

Jakob Reschke jakres+squeak at gmail.com
Sun Nov 28 18:37:45 UTC 2021


Your code snippet sounds reasonable to me, for Inspectors of course.
What exactly do you need to know further?

The selector to make them programmatically closable is #makeClosable.
With #mustNotClose you can test whether a window is currently unclosable.
When you click on the close button (X) the window gets #closeBoxHit
sent to it, but that eventually also sends #delete.
You may want to check whether the morph is actually a SystemWindow,
but other morphs would not often have a tool as their model.
And finally, the classes of workspaces and browsers are Workspace and
Browser, respectively -- easy enough.

Kind regards,

Am So., 28. Nov. 2021 um 19:28 Uhr schrieb gettimothy via Squeak-dev
<squeak-dev at lists.squeakfoundation.org>:
> Hi Folks.
> Somthing along the lines of this:
> World submorphs do: [ :e |
>     [ (e model isKindOf: Inspector) ifTrue: [ e delete ] ]
>         on: Error
>         do: [ ] ]
> I have ~30 workspaces and 6 browsers minimized and the "close" button is not visible because I made them all uncloseable.
> I would like to  programmatically close them using something like the above.
> cordially,

More information about the Squeak-dev mailing list