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 Sp2002 P4 Milestone

Ask questions on P4 here...

If we would like to make our maps zoomable to 4 levels, for better visual and flexibility, would we be penalized for it? We thought it would be better to have 4 zooms instead of 2. Jonathan Broomfield
Four levels of zoom is okay IF it's obvious to the TA what you're doing. Imagine that you're a user that expects three levels of visibility (two levels of zoom) and so starts clicking on things, but nothing works because you have to zoom lower first. I'd call that a usability bug. Mark Guzdial

On p4 it says that the buildings should be clickable. Does this mean that the buildings should have the same functionality as they did in p2? If so, then that means that the only way to zoom on a building is by a list menu or the like. Is this correct? Should the buildings be clickable as in p2 or should a user be able to zoom on a building as they are able to zoom on the rest of the map. Thanks

Randy Rockinson
I think buildings should be clickable, as in P2, but be usable and see what your TA buys as being usable. Mark Guzdial

Im trying to use TGen, i have the grammer and tokens typed in and saved, yet, when i try to test my grammer, it keeps throwing up a newline as an error (whether i have or dont have the line
whitespace : [\s\n\t]+ {ignoreDelimiter} ;
included in the token list)(whitespace has the greater and less than signs around it, they wont display in html though). The file format we had decided on uses newlines to separate the elements. Is this something we will have to switch, or is this something to do with TGen?
Check your tabs in your token specification. They have to be in the RIGHT places, or it won't work. Mark Guzdial

Clarification-input goes from:
Campus2DSCANNER ERROR: illegal character encountered: '$

I am also having trouble getting the scanner to recognize a SmallTalk string, ie 'Ferst' .

How are you specifying it in your grammar? Mark Guzdial

Also, i cant find a method that will tell a scanner that we install to parse a string or file or anything, can you please point that out to me?
Brian Byrne
Check the slides on TGen – I give an example of how to parse using the installed scanner and parser. Mark Guzdial
what slides? :) theres no slides that i see relating to TGen. and if there are, i cant find them
Brian Byrne
.GO LOOK AGAIN AT THE Spring 2002 Class Schedule. You'll see that there's a link from there: "(If you want links to all slides, see Spring 2000 Lecture Schedule)" I see parsing slides there. (They're also on your CD.) Mark Guzdial .

How do you put a newline indicater into a string literal?

This actually works but looks disgusting: (myString), '
' The alternative is to do this: (myString), (Character cr asString). You can check Character for tab, space, and even single-quote. Webb

Or 'hello', String cr. Shaggz

For the requirement that "ALL buildings on the GT Alumni site are represented", what do we do about buildings that appear on the alphabetical listing, but not on the actual map? For instance, the 'Aerospace Combustion Laboratory' (building 102) is listed in the alphabetical listing and will appear in search results, but there is no actual building 102 on the image map. There are 12 buildings (11 excluding the double listing of Rich) that are like this: how should we deal with this problem on our maps?

D. Hilley
Only include those buildings that are in both listings. Mark Guzdial

You do NOT have to support the P1 route API in P4. Mark Guzdial

I have two questions....I have created a custom menu and added something like 'menu add: 'Brian' action: #brian' with a method called brian that should just print hello to the transcript. One you click, the menu pops up with all my selections, but clicking on Brian selection does not print hello to the transcript?? any suggestions as to why my symbol is not working.

You are close to having the custom menu working. When you say, "menu startUp" try setting it to something, "rtn := menu startUp". now rtn will be "#brian". What did you expect #brian to do? it is a message that needs to be sent to whatever object is using that, "someObjThatDefinedBrianMessage perform: rtn". Webb

My second question involves reading from a file in squeak, I have done lots of looking in squeak but have found lots of things that look like filereaders but have yet to get on to work, any suggestions as to which class to look at? Thanks.
Brian Pashel

check out FileDirectory, FileStream, ReadWriteStream, and their neighbors/kinsmen - you should find what you need from those. An example is SampledSound fromWaveFileNamed: which calls fromWaveStream: Webb

.Like Webb says on both questions. FileStream is in Chapter 2. It's also in the Chapter 2 lecture notes. Mark Guzdial.

I had a couple of questions about the zooming properties of the map. Here's how I am interpreting the directions. When you start the program, an 800x600 map should come up. You should then be able to click anywhere on the map and zoom to the 1st level, which will have the buildings as 16x16 images. You can then click on a building and have the 2nd level zoom display that image completely on the map. My questions are:

1) on the 1st level of zoom, can you click anywhere on the map or just on the clickable buildings.
2) on the 2nd level of zoom, should the image just appear as the actual size of itself which surrounding roads and stuff displayed?
Andrew Thigpen
At the first level of zoom, I should be able to click anywhere to be the focus of the next level of zoom. Sure, you can show the building on the 2nd level of zoom, but I should still be able to click on the building to get the name, address, etc. Mark Guzdial

so, should we be able to click on the buildings to get the name and address on both levels of zoom or only on the second? Nathan Owens
Definitely on the second, optionally on the first. Mark Guzdial

Is there any way to crop a morph? That is make a new morph from a
section( say rectangular) of another morph? Or is there a way to display only a piece of a morph?

Randy Rockinson
Sure, see the MagnifyingMorph for an example. Or did you really want to take a piece of a Form? If the latter, take a look at Form class method fromDisplay: to get an idea how to do it. Mark Guzdial

What do we do about buildings on the image map that either have a) no picture associated with it, b) no address associated with it, or neither associated with it..? The criteria mentions that we lose 15 out of 20 points if we miss a SINGLE building, and with so many buildings and the above-mentioned ambigious cases, it seems very easy for us to lose so many points.. Sooo is there any way you guys can furnish us with a list of all the required buildings?? Thank you.

I also did say earlier that if you don't have a name and a picture, you don't have to include it. You do have to include those without addresses – you just won't provide routing info for them in P5. Mark Guzdial

How do we send an argument in a symbol with a pluggable button. Say we want the button to call foo: with argument int := 1 when the button is pressed. Hhow do we do that?
Randy Rockinson

You don't. Instead, try the SimpleButtonMorph class. You'll get what you want there, and it's not too much different from the PluggableButtonMorph.

Nathan Owens
Thanks, Nathan. Mark Guzdial

The Map doesnt have a marietta Street, what do we do about buldings
that are located on marietta street? Chase Peeler
Add the street to your Map. I never said that your P1 map would work for P4. Mark Guzdial

If you embed one Morph in another Morph, and both of them handle mouseDown, do they both get the event when it occurs, or is it only the top Morph?
Only the top Morph. Mark Guzdial

Also, should the project and ECoDE project be the same, or can we turn in two seperate projects?
Meghan Byrne
Two separate projects. Mark Guzdial

Buildings that are listed twice (such as the french building), I assume only need to be there once. The reason they are in there twice is because they appear in multiple quadrants.
just in case anyone needs it, this is a link to the facilities list for georgia tech. it has all the addresses that aren't listed on the gt alumni map.
Jimmy Sobeck
Yup, just once. One of the downsides of the alum campus map. Mark Guzdial

The alum campus map seems to be completely bogged down right now (me thinks from cs2340 projects...), has anyone ripped out the html tree for the site? If so, can you make it available? I am trying to do so right now but the site is not responding.
I did suggest parsing the site with a webcrawl and create an intermediate form. That makes P7 easier, and it handles the case when the site goes down. Mark Guzdial

Alternatively, could everyone please take it easy on the site? Trying righting your parser so that you can generate a model once and don't have to reparse the site constantly.

da weazel
Wise words. Mark Guzdial

I think the Alumni server has been put out of order somehow... but we didn't have all the info we needed off it. Anything we can do but wait?

Derrick Coetzee
Nothing much that I can suggest. Mark Guzdial

I filed in tgen.14Nov1237pm.cs into the 3.2a-4646 image.
Then I did "TranslatorGenerator runAllTests" in a workspace.
Error: A class named TgenTemporaryTestScanner already exists.
Then the same error, but with class TgenTemporaryTestParser.
These errors alternate about 10 times.
The output in the transcript window is :

T-gen TEST SUITE (answer 'yes' to all prompters)
START: T-gen LL Parser Generation Test 1
STOP: T-gen LL Parser Generation Test 1 failed.
START: T-gen LL Parser Generation Test 2
STOP: T-gen LL Parser Generation Test 2 failed.
START: T-gen LL Parser Generation Test 3
STOP: T-gen LL Parser Generation Test 3 failed.
START: T-gen LR Parser Generation Test 1
STOP: T-gen LR Parser Generation Test 1 failed.
START: T-gen LR Parser Generation Test 2
STOP: T-gen LR Parser Generation Test 2 failed.
START: T-gen LR Parser Generation Test 3
STOP: T-gen LR Parser Generation Test 3 failed.
START: T-gen LR Parser Generation Test 4
STOP: T-gen LR Parser Generation Test 4 failed.
START: T-gen LR Parser Generation Test 5
STOP: T-gen LR Parser Generation Test 5 failed.
START: T-gen LR Parser Generation Test 6
asterisk snipped
STOP: T-gen LR Parser Generation Test 6 succeeded.
START: T-gen Scanner Test 1
STOP: T-gen Scanner Test 1 failed.
START: T-gen Scanner Test 2
STOP: T-gen Scanner Test 2 failed.
START: T-gen RRPG-to-CFG Transformation Test 1
asterisks snipped
STOP: T-gen RRPG-to-CFG Transformation Test 1 succeeded.
START: T-gen RRPG-to-CFG Transformation Test 2
asterisks snipped
STOP: T-gen RRPG-to-CFG Transformation Test 2 succeeded.

Any suggestions?

Hank Wilde

Have you tried typing in any of the examples by hand to see if they work? The other option, if you can't get TGen to work, is to use the built-in HTMLParser. Mark Guzdial

"More than 256 literals referenced.
You must split or otherwise simplify this method.
The 257th literal is: 126"

I keep getting this error inside squeak when I try to put together my array of buildings...It's only 193 long, so I'm not sure where it's getting 256.
Matt Greenberg

I saw that P4 does not need to support the P1 API, but I'm not sure if that means the protocol or the functionality. I mean does P4 have to trace streets like P1?
Rick Giuly

API refers to the functionality. In other words you don't need to support any of the methods that where required for M1. No you do not have to trace streets for this milestone. But take note, you will need to trace routes again in the next milestone Sami Deen

"I want to zoom ANYWHERE on your map and get a zoom with the point that I selected at the center of the zoomed image." This led to ugliness when we clicked on the edges of the picture, we would grab other parts of the World. So we wrote it so that it modified where you clicked and zoomed in on that part, still showing where you clicked but not in the center. Then I saw the quote above. Will we get points counted off if the point clicked on is not right in the center of the zoom, or can we move it so its pretty when someone clicks near the edge? The point clicked on is in the center if the point clicked is not near the edge of the picture.
Fried Rice

is there any way to force a stream to close? I am having to fileout my progress, close squeak, reopen it, and filein each time I crash it inside the method that opens the filestreams. problem is it crashes before it gets to the line "aFile close".

Hank Wilde

If the image is too big, and I want to shrink it. How can I shrink the image in Squeak?
Wendy Mui

Link to this Page