feenkcom / gtoolkit

Glamorous Toolkit is the Moldable Development environment. It empowers you to make systems explainable through experiences tailored for each problem.
https://gtoolkit.com
MIT License
1.13k stars 49 forks source link

Override 'gtDefaultInspectorTool' in Lepiter related classes so that you can toggle back to 'LePagePhlowTool' #2662

Open botwhytho opened 2 years ago

botwhytho commented 2 years ago

Good to be able to get back to an 'uncluttered' view that's not the typical inspector tool. For various classes, maybe I'm missing some, but main ones would be:

Something like below so the default would be the inspector but still have to option to toggle back into the clean view/tool to get things out of the way.

^ GtPhlowCompositeTool new
        addTool: (super gtDefaultInspectorTool);
        addTool: (LePagePhlowTool new)

For different classes the page you get back to may vary, for page and snippet the obvious answer is the related page, for a database it's probably the table of contents (or a random page if none exists).

botwhytho commented 2 years ago

The most useful and quick would be to modify this on LePage only

botwhytho commented 6 months ago

On v1.0.734 , ProtoObject>>#gtActionInspectFor: defines aTool yet doesn't use it, that seems like a bug in all contexts:

aTool := self gtDefaultInspectorTool.
aButton phlow spawnObject: self

The second line should send spawnTool: aTool to phlow.

On LePage, the below should be defined and things worked as expected:

gtDefaultInspectorTool
    ^ self asPhlowTool