Dynamic-Book / drgeo

GNU Dr. Geo, a Dynamic Knowledge Model on geometry
https://www.gnu.org/s/dr-geo
GNU General Public License v3.0
18 stars 1 forks source link

DrGeoFigure outside of DrGSmalltalkSketchEditor ? #22

Closed cstes closed 6 months ago

cstes commented 6 months ago

Hi, I am impressed by DrGeo running on Cuis 6.3. What works for me is startinging DrGeo with drgeo/startIDE.sh, and then when I evaluate:

DrGeoSystem beDevelopment. DrGeo new

I get a window where I can interactively draw.

However the nicest part that I have seen so far is running the

DrGSmalltalkSketchEditor

When I evaluate and open the Browser for the DrGSmalltalkSketchEditor it contains a list of examples such as Archimedes PI, Bernouilli, Durer, Fermat, Newton-Raphson and others.

These sketches are really nice, and the code can be inspected.

I am able to use small pieces of code like DrGeoFigure nouveau

inside the DrGSmalltalkSketchEditor. That works.

However when I evaluate DrGeoFigure nouveau in a simple regular Cuis Workspace I see no output .

I only see the DrGeoFigure (or sketch) in the DrGSmalltalkSketchEditor when I open that first.

Is there a way to display DrGeoFigure in the window displayed by DrGeo new ?

Regards, David Stes

cstes commented 6 months ago

It's actually DrGSmalltalkSketchBrowser that displays the list of examples ...

DrGSmalltalkSketchBrowser open:(DrGeoSystem smalltalkSketchesPath) label:'Browse".

So I open DrGSmalltalkSketchBrowser or DrGSmalltalkSketchEditor I can display and see DrGeoFigure output (for example from DrGeoFigure nouveau).

However I am unable to display DrGeoFigure nouveau from the Cuis Workspace without first opening eitherDrGSmalltalkSketchBrowser or DrGSmalltalkSketchEditor.

Is there a way to do it or is this a misunderstanding from my part ?

hilaire commented 6 months ago

Nice to read you enjoy DrGeo on Cuis! I am glad that startIDE.sh is now working for you. Thanks to report it!

DrGSmalltalkSketchEditor development is an on going effort to get in one place a Smalltalk sketch editor, a viewer and a simplified debugger. Its aim is to improve the usability experience for young learner (13 years old students). This is the age of the students I am using DrGeo with.

Technically, when executing a Smalltalk sketch (in a regular Workspace or the SmalltalkSketchEditor), there is no direct opening of a view, instead an event is triggered to inform to whom is listening a new sketch was instantiated and that a view could be open. It gives me more flexibility to attach the view to the Smalltalk Editor or Browser as you have experienced it. You can read DrGeo>>initialize.

Therefore, when executing a Smalltalk Sketch in a workspace, to get the view, you have to explicitly open it:

| sketch |
sketch := DrGeoSketch new.
sketch point: 0@0.
sketch view openInWorld
hilaire commented 6 months ago

Not a bug