Thanks for the update and sorry I couldn't make it out tonight. I agree that it would be useful to have a catch up week and I should be there next week. I completed HW3 (minus a weird polygon clipping issue...has anyone had this?) but haven't gotten to Presence yet.
One thing that bothered me about my implementation of HW3 is that I think my first implementation was violating MVC. I maintained a count of the "current sides" in PolygonView because I didn't have access to the PolygonShape instance from the PolygonView. For example, in my Controller's updateInterface I had
[polygonContainer drawPolygon:[poly numberOfSides]];instead of just calling
[polygonContainer drawPolygon]without a sides parameter and then getting the number of sides in the drawPolygon method.
Looking at John's code, I realized I could create an outlet from the PolygonShape to PolygonView using the interface builder. This allowed me to call [myPolygonShapeInstance getNumSides] in my PolygonView and solved the issue. Just thought I would share this in case anyone else struggled with it.
Also John, I am not sure why the bolded lines are in your code. Would you mind commenting on that?
@class Controller; @interface PolygonView : UIView {
IBOutlet Controller *myController;
IBOutlet PolygonShape *myPolygon;
IBOutlet UILabel *polygonName;
}
-Tony
--
Tony C. Amoyal
www.tonyamoyal.comwww.dailysongfix.com(240) 417-3112corga...@gmail.com