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

Russell Myers' Discussion 3

Part I: The Alignment Problem
When I started with Milestone I, I started like I do with any project – I sit down and draw out a prototype and thing about how I want to design the particular program based on the prototype and the principles that guide the problem at hand. The project itself was pretty straight forward, but it was the layout I was more particularly concerned with and interested in making look like the prototype.

Although I know now, and did to some extent at the time, that there is a sort of layout policy for every morph, I am still, even to this point, unsure of how to use it. I did, however, discover the AlignmentMorph. Although supposedly outdated, it offered me a great deal of what I needed for the project: three rows that were all centered, each containing a certain amount of internal morphs.

Essentially, the way the alignment morph works is that you can create either rows or tables:
column := AlignmentMorph newColumn beTransparent. "a transparent column" row := AlignmentMorph newRow. "a row"
The way I understand it, if you think of it like a table – say, like HTML or any other sort that uses the table idea – you basically can have multiple rows and columns. For my purposes, I simply used one column and inserted rows into it:
column addMorph: row.
Now keep in mind that the alignment morph is just that, a morph. As such, I can add the objects that I'm interested in being on the rows directly:
row addMorph: someButtonOrText.
So with what I've gone over so far, you can essentially make a number of columns and rows and compose them into a custom table layout. What about the actual heart of the matter, "alignment"? Personally, I was interested in centering all my objects about the center of the morph – I wanted each individual row's objects to be centered. Well, the alignment morph itself provides the mechanism for centering (as one would expect). I'll leave it to be investigated, but I will tell you that the "listDirection" and "wrapCentering" methods allow this.

Also, to conclude, an interest piece of information regarding these morphs, you can add spacing like so:
row addTransparentSpacerOfSize: (10 @ 0)

Part II: Interesting Discussion Issues

Discussion 3 - Samuel Young
I found Sam Young's description of his issues with file system selection problems particular interesting. This would probably save a lot of people a great deal of time when trying to specify certain types of files to be selected by this method. Indeed, an unexpected bug in software could cause hours of headaches for future developers, as I'm sure it did for him. This problem will be a useful thing to understand later in the project as more file import options will surely be needed.

http://coweb.cc.gatech.edu/cs2340/4336#disc3 – The Period Problem
As I too started out, I commonly had issues with the "period problem" and was sort of cofused as to when or when not to apply the little dot. As it stands now, I understand it must be applied to anything that isn't the last line. As of now, this is no longer a problem, but, I always make sure to check periods first!

Links to this Page