Cuis-Smalltalk / Cuis-Smalltalk-Dev

Active development of Cuis Smalltalk
MIT License
435 stars 70 forks source link

Inconsistency in Tool instanciation #180

Closed hilaire closed 3 years ago

hilaire commented 3 years ago

I found this inconsistency when instantiating new Workspace (compare to Browser and Transcript):

BrowserWindow openBrowser morphBounds: (0 @ 0 extent: extent).
BrowserWindow openBrowser morphBounds: (area width // 2 @ 0 extent: extent).
BrowserWindow openBrowser morphBounds: (area extent // 2 extent: extent).
Workspace openWorkspace.
TranscriptWindow openTranscript morphBounds: 
    (0 @ (area height // 2 + (2 / 3 * extent y)) 
        extent: extent x @ (1 / 3 * extent y )).

The way Workspace is created is also annoying because you can't access its view. I can't programmatically open a workspace where I want in the world.

jvuletich commented 3 years ago

Just pushed an update to make #openWorkspace answer the Window. Now, these work the same: BrowserWindow openBrowser morphPosition: 100@100 extent: 600@400. Workspace openWorkspace morphPosition: 100@100 extent: 600@400. TranscriptWindow openTranscript morphPosition: 100@100 extent: 600@400.