home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!src.honeywell.com!analysis!campbell
- From: campbell@src.honeywell.com (Terry Campbell)
- Subject: Re: The difference between smalltalk/v and smalltalk/80
- In-Reply-To: gt0054b@prism.gatech.edu's message of Tue, 19 Jan 1993 02: 03:51 GMT
- Message-ID: <CAMPBELL.93Jan22131710@analysis.src.honeywell.com>
- Originator: campbell@analysis.src.honeywell.com
- Sender: news@src.honeywell.com (News interface)
- Nntp-Posting-Host: analysis.src.honeywell.com
- Organization: Honeywell Systems & Research Center, Mpls. MN, USA.
- References: <1993Jan13.104536.61893@qut.edu.au>
- <1993Jan15.115634.62092@qut.edu.au> <1993Jan15.120050.62093@qut.edu.au>
- <1993Jan19.020351.5860@cc.gatech.edu>
- Date: Fri, 22 Jan 1993 19:17:10 GMT
- Lines: 30
-
-
- In article <1993Jan19.020351.5860@cc.gatech.edu> gt0054b@prism.gatech.edu (E. J. Lee) writes:
-
- > MVC takes the approach that there are THREE parts of an application, an
- > application domain part, the "model", a purely graphical part, the
- > "view" and a purely interactive part, the "controller". In general,
- > views and controllers come in tightly linked pairs. For instance, the
- > standard text editor comes with a controller specifically designed for
- > text editing. Likewise SelectionInListViews have their own specific
- > controllers, etc. A model will create one or more views on itself to
- > interpret user actions in terms of its application domain. When a view
- > "opens" itself, it will create an instance of its specific controller to
- > handle its user input.
-
-
- >> The thing that confuses me most is the separation of view and controller.
- >> What would be an example of a view with multiple controllers or vice-
- >> versa?
-
- I had occasion to use this paradigm in a graphical editing application I
- developed. I used the typical tool pane with icons to select the drawing
- tools I was interested in and a graphPane for drawing. Each tool button
- selected a mini-controller that interpreted user gestures in the context of
- the selected tool. Thus, a line tool acted differently to clicks and drags
- etc, than a box tool. Alternative ways of doing this of course include
- keeping a state for the application and using case statements (or dynamically
- dispatching via. perform:). I found the seperation of gesture handling into
- multiple controllers sharing the same view to be useful as it allowed me to
- group related bahavior into classes.
-
-