






Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Achin Batra : Milestone 1 (Basic DrawingEditor)
gte285u@prism.gatech.edu
Purpose:
To Create a simple DrawingEditor. In this MileStone, we all had to create a simple Drawing Editor in which we would display 4 buttons, and have the functionality of creating a line, a circle, and a rectangle.
What I did:
I created an extremely simple DrawingEditor. At this time, I had not learned Morphic and did not know how to do much in Squeak. What I basically did was create a new form. That form was divided into 5 sections. There was a section for each button (line, circle, rectangle, stop). Then there was a section for the drawing editor. My buttons basically worked in a very simple manner. I had set a certain area for each button. Now, whenever a user clicked any of the button, I checked if the area of any of the buttons matched with the user click. If the area matched, then it did a certain task. The way drawing was implemented was really simple. After I had done checking which button was pressed, i had to check for mouse clicks. In all of the shapes we had to get two clicks from the user. Therefore, I used waitButton for getting the first click, and waitNoButton to get the release. After I received the two clicks, I called the appropriate function for the shape. For the rectangle, I had to calculate all the four points. For the circle, I had to calculate the radius. Once I had done that, for rectangle and pen, I just drew them using a pen, while I created a new instance of Circle class (already in squeak) and drew that onto the screen.
What I could have done:
What I did was the most simple way. This way was basically implemented throught the lecture slides provided in the class. What I should have done is create buttons elsewhere, as one can draw over the button. Although what I did got the basic job done, my DrawingEditor could have been fancier.
Conclusion:
At the start of the assignment, I had no idea how to code in squeak. Therefore, I was a bit nervous. Once I started working on the project, I found squeak quite easy to use. What I disliked was the fact that there was no documentatin of any of the code. I basically found this out when I was creating my circle.

Source:
MileStone 1
Link to this Page
- Cases last edited on 30 July 2011 at 2:33 am by r59h132.res.gatech.edu