View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Questions on Fall 2003 Milestone 7

Got questions on Fall 2003 Milestone 7? Ask 'em here.

Jorge Lage

What exactly do you want us to show in the following:

"Halt and step through code using the debugger"
"Create (paint) A 2D image in Squeak"


Jeff's response:

For halting and stepping through code, you need to demonstrate how to stop code (either through Alt-. or sending a halt message, you can choose which), inspect the values of the instance variables and context, and step through several lines of code while pointing out the effects of each step (e.g. UI updates, changes to the instance variables, etc.).

For creating (painting) a 2D image, you need to demonstate how to open the Paint tool (e.g. by pulling the Paint widget from the Widgets tab), paint something, and then keep the painted image as a SketchMorph.

Adam Poncz
For Halt and step through code using the debugger

Could you write code that when ran throws up a Debug Window and then you can step through a few lines of code. Would that satisfy this part of the assigment?

Jeff's response:
Yes, that would do it too.

For the drawing part, do I have to show an animated drawing, or can I just generate a shape onto the canvas (like a star perhaps)? Basically, I have figured out how to generate a shape onto the sketchmorph, and how to make a single dot appear. But actually getting it to draw a picture has eluded me. If I do have to animate a drawing, has anyone found a clue in sketchmorph, handmorph, inputsensor, etc that could lead me in the right direction?

Kris Kemper

Jeff's response:
We do want you to animate the drawing. Short of creating your own events to draw into the canvas, you might try:

Ok, so I figured out how to begin rotating with the halos. The problem
with it is that once it is rotated both the bounds and fullBounds for
the window go crazy with topLeft's in the negative range even when
they shouldn't be. This means that I can't move my mouse to it because
the bounding box is totally in the wrong place. Anyone else see this?

Nirmal Patel

Jorge Lage

What do you mean by begin rotating?

Sorry what I meant to say both here and on the newsgroup is that I can rotate the morph once with the halo but after that if I go to rotate it again (like in a separate animation) the numbers are all screwy.
Nirmal Patel

Jeff's response:
Lex suggested a possible approach on the newsgroup, but I'll echo it here. Check out localBoundsToGlobal:.

We are wondering what the best way, from the HCI view, to handle a user running the same task twice is. For example, creating a new constructor: the first time through we will ask the user to click the 'no messages' category, then start typing the new method. However, if the user runs this task again, clicking 'no messages' would not work because that is no longer an option (it would now be 'as yet unclassified').

In general, what would be the best way to handle resetting the task (undoing what would have been done the first time)?

We don't want an overall pre-condition for the task that resets everything, because we allow users to come back to a task at anytime, and we wouldn't know if this is their first time to view the task or not.

We don't want to force a tear down at the end (then they would immediately lose what they have done).

Any ideas?

Jason Whitehurst

Jeff's response:
Good question. Several possible approaches spring to mind:

1. Keep track of what steps the user has completed, so that you know whether "no messages" or "as yet unclassified" is appropriate. Note that this presumes that only a single user is working with the help repository.

2. Put a dependency into your code to check for the constructor you're defining. If it exists, figure out what method category it's in and use that as the label to look for. Otherwise use "no messages."

3. Check for whether the user fully / partially completed the task, and then prompt them for whether or not to roll back. For example: "You've partially completed this task before. Would you like to continue, or would you like to start over from scratch?" If they choose to start from scratch, reset everything.

I've been creating a lot of classes dynamically. A problem that I'm running into a lot is that when I try to use the new classes for some reason an obsolete version of my class is used instead. I don't really know why this is happening because the class is there and is just waiting to be used. Any insight is much appreciated.

Nirmal Patel

Jeff's response:
Do the classes you're creating dynamically have unique names, or do they share the same name? One possibility is the handle on the class you're creating is still pointing to one of the older classes.

They don't have unique names. Usually what happens is that my dynamically created class is not exactly how I wanted it to be so I delete it. Then I make fixes to the class creation and recreate it. This causes the error. I think that the reason this happens is because the code is already compiled and has pointers to the old class which is now obsolete. How can I force everything to dynamically check for the new class.

Nirmal Patel

In reference to the Halt/Debug task we're supposed to write, when we run some example code to throw up a debug window, the avatar stops running animations. It seems like the halt takes focus away from everything. Is there any way to allow animations to work again or has anyone else run into this problem? We're assuming threads aren't really an option in Squeak.
David Browning

Jeff's response:
If you generate a halt inside an animation, the scheduler shuts down.

Why are you assuming threads aren't an option in Squeak? They're built-in, and we talked about them in class.

when showing how to use halos around a morph, can we bring up any morph we choose as an example for our demo or would it be better to use a specific one?

posted by Anne Gurley

Jeff's response:
You're welcome to use any morph you want.

Link to this Page