Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment the Smalltalk Sketch methods #6

Open
hilaire opened this issue Dec 25, 2023 · 0 comments
Open

Comment the Smalltalk Sketch methods #6

hilaire opened this issue Dec 25, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers smalltalk sketch Issues related to DrGeo Smalltalk Sketch, i.e. Sktech coded with Smalltalk

Comments

@hilaire
Copy link
Collaborator

hilaire commented Dec 25, 2023

Smalltalk sketch method could be documented by adding a comment at the top of each method of the class DrGeoSketch.
For example, by commenting:

DrGeoSketch>>Point:
point: aPointOrBlock
"Create a new point defined by a coordinates or a block of code.
	sketch point: 5@0.
	sketch point: [5 atRandom @ (10 atRandom - 5)]"
	^ aPointOrBlock isPoint 
		ifTrue:  [self finalizePoint: (DrGPointFreeItem newWith: {aPointOrBlock})]
		ifFalse: [self finalizePoint: (DrGPointBlockItem newWith: (OrderedCollection with: aPointOrBlock)	)]

Then from the Smalltalk Sketch editor, with the code autocompletion tool of the editor, the user can read the comment by pressing the keys Tab then -> :

Capture d’écran du 2023-12-25 11-27-26

@hilaire hilaire added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers smalltalk sketch Issues related to DrGeo Smalltalk Sketch, i.e. Sktech coded with Smalltalk labels Dec 25, 2023
@hilaire hilaire changed the title Comment The Smalltalk Sketch methods Comment the Smalltalk Sketch methods Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers smalltalk sketch Issues related to DrGeo Smalltalk Sketch, i.e. Sktech coded with Smalltalk
Projects
None yet
Development

No branches or pull requests

1 participant