






Hotspots: Admin Pages | Turn-in Site |
Current Links: Case Final Project Summer 2007
Questions on Summer 2003 M2 Milestone
Got Questions?
How do we check to see if the "Escape" key has been pressed (ie. what key value does Escape have tied to it)?
Check out the method kdbTest which you can send to Sensor (which is an instance of InputSensor). It will tell you the code for any keyboard key you press until you press x. Barbara Ericson
Can someone answer the question in newsgroups:
Subject: [M2] between different image formats and key pressing
Message-ID: <87znl6ixm8.fsf@r66h13.res.gatech.edu>
How do you save the image picture back to the directory when it is in the 'Form' type.
Look in the fileIn/Out method category for methods that write out files from forms. Barbara Ericson
Does the hint for reducing redness work only for JPEG files or for all files (BMP, GIF, JPEG)? i get an error when i try to do it on other files besides JPG files. error says something like: "Error: trying to use a color that is not in my colormap"
Giffs are limited to 256 colors. So, that may be your problem. There is probably a message that changes a Form objects colormap to a larger colormap (check out depth: and read the class comment). You could also save the form as a jpeg and read it back in. Barbara Ericson
"You must also include written text of at least one scenario that you used in your analysis."
What does that mean? (Example?)
A scenario is a textual description of how the objects will work together to do a task or meet a goal. For example, how do the objects in a restuarant work together in order to feed a customer. See chapter 4 page 98 for example scenarios for the clock example. Barbara Ericson
Hello. What methods should we overwrite to handle Keyboard events? HandMorph? Something of that nature?
See slide 85 from lecture yesterday if you are working in morphic. Barbara Ericson
"Show should shift back to slide show mode starting from the currently visible slide. Use a default delay of 5 seconds per slide."
Does this mean the slide show in general should also start with a delay of 5 seconds per slide? If this is the default time, how should the user be able to change it?
show: numSeconds is from milestone 1 as an instance message to SlideShow which specifies the number of seconds to wait between slides. What milestone 2 is asking is when you are in Slide Edit Mode and you click the "show" button you should do a slide show from the current slide with a default of 5 seconds between slide. You could also create a resumeShow which continues from the current slide with the current time between slides. You could have a delayTime: time method on SlideShow that sets the delay time. You can always do more than we ask for in the milestones! Barbara Ericson
If we're supposed to use good model/view/control separation of code, how should we tell our TA's what classes/methods should be used to grade our milestone? I've separated my model (SlideShow) from my display, so simply sending it a 'show:' will appear to do nothing. Unless of course, a display is first created, and is set to have a SlideShow instance as its model.
Separating the model from the view doesn't mean that you need to break things that were working. In fact, we expect all old funtionality to work in Milestone 2 from Milestone 1. So show: numSecs should still work to show the slide show with the number of seconds delay between the slides. See the pluggable version of the clock in chapter 5. A slide show probably should have a display window (or inherit from one) since that is what a slide show is. Barbara Ericson
I haven't broken anything, and I have looked at the clock example in chapter 5. If I'm not mistaken, the author also separates the interface from the model. The Clock is the model, and ClockWindow is the view. Simply creating a Clock instance and sending it the message 'start' will appear to do nothing. You have to first create an instance of ClockWindow, and set a Clock instance as the model before you actually see anything (Page 157, openAsMorph). Like the clock example, I use a SlideShowDisplay class to visualize the slide show. SlideShow still increments the current slide with numSecs delay between slides after a 'show: numSecs' message, it simply has no way of showing it (Much in the same way Clock continues to track time, but doesn't handle how the time is shown). SlideShowDisplay instead listens to SlideShow as it changes, and visualizes the proper slide. If I place a display window into my SlideShow class, then I'm setting a default view in my model, which defeats the purpose of separating the two in the first place.
I understand what you are trying to do but think about what a slide show is. A slide show is a visual showing of slides so it makes sense for it to have a window or inherit from window. In the morphic example of the clock the ClockWindow creates the clock model (see page 157) and that is pretty standard that the view will create the model or the model the view. They are still two different classes. If you want you can give instructions to your TA about how to run your slide show or you can just name the display class SlideShow and the model SlideShowModel or you can create the display when you create the model. A clock model is something that is reusable but I am not sure a SlideShowModel is. Barbara Ericson
A SlideShowModel is resuable in the sense that it can be displayed in many ways, whether as a "slide show-ing" where each slide is placed on the screen one at a time, or as thumbnails to be rearranged, or as a single slide to be edited. I thought that was the whole point of the MVC paradigm. Beyond that, no a SlideShowModel is not reusable. But if it isn't an illustration of better design, then what's the use of this entire class?
The purpose of this class is to learn about objects and design. And, part of that learing is from discussion. I am glad that you are trying to use the MVC paradigm. But, one of the goals of design is to make cohesive parts that can be reused. I would expect something called SlideShow to be able to show slides visually. Now, it may do this by telling another object to display (your SlideShowDisplay) and that is fine. But, in order to make classes that can be reused we want to create things that work as expected. And given that the milestone 1 requirements used SlideShow to display the slides I would say SlideShow would be the view if you want to pull apart a slide show view and model. Barbara Ericson
If the file is saved in a new format. (since Form can only save in jpeg and bmp, i plan to save all as jpeg since thats easiest to edit) should we just delete the original file if the filenames differ?
Is that what you (or a user) would expect it to do? Barbara Ericson
Ugh.... Geez lady I dunno.... Yes?
If I wrote it, I would expect it to do that, yes. Either that or I wouldn't support the gif files.
Where are the TA's?
might want to check out GIFReadWriter ... and writeJPEGfileNamed ... and writeBMPfileNamed ...
How in the heck do you use GIFReadWriter I'm very much so confused!
http://coweb.cc.gatech.edu/cs2340/730
Link to this Page