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 Fall2002 M4 Milestone

Questions on M4? Put 'em here!


In class on Thursday, we were shown a geneology program that displayed the ancestors of a person several generations back, but it only showed 1 generation after (only the children). The program had a good interface though (or at least it looked like it did) that allowed easy navigation to see other relationships. My question is this:

Do the requirements for M1 still stand for M4 so that we have to display any number of generations above and below the specified person? Or do we have freedom to specify our own GUI so long as there is a README file or something to explain the use of it (something we'd have to do anyway...).


M1 says to display 5 generations in total. It merely uses the 3-2 rule as an example of how to separate the 5, but you could do it as 4-1 or even 5-0...likewise, 0-5 and 1-4 are valid too. The whole idea was that you could construct a visualization matrix flexible enough to wrap around points in a geneology tree. Chris Verges



Does Squeak have a Morphic object for inputing a date via selecting a day/month/year?

Not that I'm aware, but you can easily create one. Chris Verges



I know that for M2, there were specifications that said, a Person does not necessarily have to have a name before being added as another Person's mother/father/sibling/etc., however, for M4 can we specify that certain rules must be followed when using the GUI? i.e., a Person must have a name before being added as another Person's mother/father/etc.? As long as we state this in the README file or something? thanks.
- Team 1

Hmm...interesting question. I would say that the precedence set by M2's rules needs to be followed: that is, whatever M2 says should be what goes when adding people using the GeneologyMap with: statement. But when adding people with the GUI, as long as you state HOW to add the people, you should be okay. Can the prof/another TA back me up on this, please? Chris Verges



In the M4 description, it says that we need to be able to do "GenealogyMap new open" is this the way that the TA's are going to be running our program? Is this supposed to be the "main method" if you will? Thanks.

You do need for "GeneologyMap new open" to work, but this should not be a real constraint on the design. Your GeneologyMap class can have just the two or so required methods on it if you want. -Lex Spoon



For CRC Card analysis, should we turn in the CRCs for the objects new to M4 (i.e. include GenealogyMap, but not Person)? Same question concerning scenarios and UML.


Lex answered this on the newsgroup. I'll recap here. If you need the full answer check the newsgroup. The emphesis will be on M4 documentation. Thats what we will be looking at. That said, you can submit your full documentations ( M3 documentation) with additional details added to the M4 part if you want to. Sami Deen



2 questions:

Does relatives have the same definition as mentioned in the questions page from M2, which includes siblings, children, parents and their siblings, grandparents and their siblings, and (great)+grandparents and their siblings?

Yes. Sami Deen

Should the GenealogyMap initially display relatives in the Map in a family tree structure? Or can we just list the people and show a family when the user clicks on a button/menu choice?

The interface to the system is your decision. If the user can enter, manage, and view his or her information effectively, then your on the right track. In other words if it works, and is usable your ok. Sami Deen



Is anyone else seriously hurting for an extension on M4? I know our group has been working hard on this one for the past 2 weeks, there are just so many aspects to it that it is proving difficult to cover all our bases.

Thought I'd see if we were the only ones...

I could, but that's mostly because I need to study for the GRE this week.

Yes, and the pain is expressed in the lack of sleep, alot of it.



Is it possible to create a menu item where the selector is a method that takes in a parameter? Here's my problem:

I am creating a dynamic menu where the items in the menu are based on a list that could change (list of people in the GenealogyMap). This is an example of the code I have now...
      menu add: (person getName) target: self selector: #(doSomething: person).

When I run our program and select a name from a menu, I get a 'MessageNotUnderstood: numArgs' error. My suspicion is that the #(doSomething: person) line is to blame. Maybe Squeak thinks that I want to create an array with doSomething: and person as the objects inside. So I tried other things too. I tried moving the # inside the parentheses to get (#doSoemthing: person) , when I do this I get a message saying 'MessageNotUnderstood: person', so I guess that its too many parameters for selector: . Then I tried making a block of code like this - blockOfCode := [ doSomething: person ] , and then putting this block as the parameter of selector...that didn't work either. In other words, nothing that I can think of will do what I want to do.

Am I close with what I've tried, or am I asking too much of Squeak?


To pass in an argument use:

menu add: (person getName) target: self selector: #(doSomething:) argumentList: #(person).

Note that person is passed in as a symbol. This is probably not what you want.

If you want to see some menu generating code, look at the class 'TheWorldMenu' (this is the menu that is generated when you click the desktop). Check out the method 'fillIn: from:' . One method that calls 'fillIn: from:' is 'remoteMenu'. Also 'menu:' is a supporting method that is used.

Sami Deen

Alright. Thank you for the tip. I got it working with a combination of the info you gave me.

The parameter for argumentList doesn't have to be a symbol, but it has to be passed in in an array. Like this:

menu add: (person getName) target: self selector: #doSomthing: argumentList: {person}.


Good point. Sami Deen



When implementing the export function can we only use the messages from M1 and M2 to recreate the tree or can we use new messages created since M1 and M2 also?
Melissa Fritcher

You can use any messages you want. The key is that your system needs to be able to recreate the family tree from the exported messages. Sami Deen



m4 says that we should implement open and openWith along with the information from previous milestones. How far does this implementation need to be, meaning that if everthing from previous milestones still work and open and openWith works correctly are we good for this milestone. Or do we have to implement adding a person, deleting a person etc.. also working for this milestone. The visual representation for doing those things are there but they are not all finsihed.

We're looking for a working GUI. Your grade will be based on how well your GUI functions. This means a fully functioning integrated front-end (the GUI) and back end ( your previous code and export). It needs to all work together correctly. Don't have a GUI come up that does little, or nothing, and fully functioning previous milestone code sitting in the background. Work at integrating as much as possible, thats where your grade will come from. If you have a time constraint, the critical step will be having some kind of reasonable graphical representation on the screen. Once this is done, you have some options as to what you want to implement. Without this step nothing more can get implemented in terms of this milestone. For example, once you have your graphical interface you can decide, if you want to implement, export (5%), graphical representations of name and aliases, gender, family relationships, marriage relationships, birth and death information, and miscellaneous information ( 4% each), a working check button, or other similar gui control (10%), and so on. Sami Deen

btw: the methods to start the system are 'open' and 'with: (Collection) open'



How exactly do you escape ' in strings in Squeak. I've been looking all over for a way but couldn't find one. This is for the export function.

Query givenName: 'Fred'



We have a custom menu that were using to select the query that the user wants to perform. However, we are having trouble calling the method that is being selected from our menu. Any suggestions?

If I have a menu and have a menu operation like:

menu add: 'Count Nums' target: self selector: #countNum.

and the method countNum has a return value, how do I store that return value in a variable in the method where the menu is created?

like:

| menu result |

menu _ MenuMorph new.
menu initialize.
menu add: 'Count Nums' target: self selector: #countNum.

//want to store result here//

how do I do this? thanks.

[Team 1]




Link to this Page