MVC roles of objects in pattern
MVC roles of objects in pattern
- Subject: MVC roles of objects in pattern
- From: "ad veloper" <email@hidden>
- Date: Fri, 5 Oct 2007 15:43:39 +0100
Does the following legitimately conform to the MVC design pattern? It seems
as though the camera object is fulfilling 2 roles: Model and View. Something
doesn't ring true about this kind of design, but I can't see another way of
doing it.
Here goes!
1. My View class has an instance of an object: Camera, which is updated
according to mouse events.
2. I also have an array of these camera objects being managed by an
arrayController in my AppController instance, so that the user may save
camera positions.
3. SelectionIndex changes in the arrayController causes the view to animate
and update its Camera's iVars to those of the selectedCameraObject in the
array.
Using this method I can decouple the array of Cameras, but still have a
functioning view.
Is this okay, or should I do it differently?
Thanks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden