Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
CoWeb Assignment 1
setUp is run before each test case, it is used for objects that need initialization before they can be tested. tearDown is run after each test case and it is used to safely destroy/close objects properly after tests are run. tearDown is needed when simple destruction of an object would be problematic such as leaving open sockets in networked applications or not exiting system processes properly. The difference between SUnit and JUnit is that java requires you to have classes created, squeak does not.
Swing As MVC
Swing provides the view for a model, which will be data you wish to represent using swing. It interacts with controllers such as mouse and keyboard using event handlers. The controllers can change only the view, only the model, or both. With morphic in squeak there is actually more model in the view, sometimes the view is the model even. Dependecies can be handled in swing using the observer/observable interface and similiarly in smalltalk using addDependent and changed.
CoWeb Assignment 2
In squeak's rather nice debugger you can do such wonderful things as:
follow your programm exectution and trace stack calls!
step in all kinds of crazy ways!
and other magical things, in fact every magical thing you might have wanted to do with a debugger maybe.
The debugger pops up it's friendly face upon an error message or you can self halt to bring it up if you want to get in depth with your code to see just what exactly is really going on.
"Gasp! My friend the debugger!"
Basically the layout is all you really need to know to effectively begin your descent into crazy fun debuggery.
The top frame shows the execution stack and you can click anywhere in it to jump to that spot. Below that are the buttons:
Proceed - to ignore errors and halts and march boldy forward
Restart - to begin afresh atop the method
Into - to journey deeper into a message and onto other methods
Over - to remain in this method and execute next message
Through - well I'm not really sure to be honest, squeak is at times a strange and mysterious beast
Full Stack - bam! full stack!
Where - bam! where you at!
And after such fun buttons who could ask for more. Not me, certainly, but rejoice, because more there is! Below the buttons is the method code window where you can see the code and where you are it in it and also edit anything you want in real debugging time. At the very bottom the instance variables are listed on the left and method variables on the right, how righteous, how truly righteous.
That about wraps it up, so remember don't get too caught up in debugging and forget to eat because you'll die.
Links to this Page
- Spring 2006 Who's Who last edited on 17 January 2007 at 1:31 pm by lawn-128-61-118-223.lawn.gatech.edu
- Free Prometheus last edited on 11 January 2007 at 2:59 am by c-71-204-43-27.hsd1.ga.comcast.net