`
`SONY EXHIBIT 1016
`
`
`
`Page 1 of 5
`
`SONY EXHIBIT 1016
`
`
`
`Sponsoring Editor: JamesT. oea,
`Production Supervisor: BetteJ. i
`Production: Michael Bass & Associa i,
`Manufacturing Supervisor: Hugh ee
`Text Design: R. Kharibian & Associates
`Cover Design: Marshall Henrichs
`
`Library of Congress Cataloging-in-Publication Data
`Nae to object-oriented programming and Smalltalk / by
`
`Lewis J. Pinson and Richard S. Wiener.
`p.
`cm.
`Bibliography:p.
`Includes index.
`
`ISBN 020119127
`2. Smallta
`1. Object-oriented programming (Computer science)
`(Computer program language)
`I. Wiener, Richard, 1941—
`II. Title.
`
`"
`
`QA76.6.P56
`1988
`005.13’3—dc19
`
`88-466
`CIP
`
`The programs and a
`pplications presentedin this book have
`
`instructional value. The
`1
`y have been tested with care bu
`particular purpose. The
`
`publisher does notoffer any wa
`nor doesit accept anyli
`
`abilities with respect to the pi
`
`Copyright © 1988 by Addison
`
`All rights reserved, No part of this publica
`
`trieval system, or transmitted, in any fo
`photocopying, recording, or otherwise.
`w
`
`Publisher, Printed in the United States
`
`
`Canada.
`
`ABCDEFGHIJ-D0~g98
`
`Page 2 of 5
`
`Page 2 of 5
`
`
`
`the Graphics Classes
`
`336
`
`Figure 9.16
`path example 1—
`Drawing with
`Complex Forms
`
` “jasses ane
`
`fset of approximately 75@75from the path poi
`Figure 9.16, the form has an of
`1 file ‘man4.form’. The display ao
`“the form asit is storedit
`This is a featureof
`CC de 7 \y
`complex form is done using an OR rule(
`
` 9.6 The Model-View-Controller Triad
`
`Any window on the Smalltalk screen has three essential components associate
`with it, the model, view, and controller. Together, these three components a
`
`Page 3 of 5
`
`Page 3 of 5
`
`
`
`lat
`
`is an
`
`called the modelL-view.¢.
`Ontrolle
`have an MVC triad that
`5
`i
`is diffe
`we
`views are noninterz
`active, Meaning thiesyane a rj
`:
`Within a
`For consistency with the MVS
`COHCERE Gea,
`AVE a
`need
`¢
`instance of class NoControlier.
`‘ea
`.
`Needfor
`ac Wiring
`VIews h
`t
`The functions Of the three SOmponents
`ave q Controller tl CoMmtres}
`are first described in Section IG Se tion oo S Seat
`abstract superclasses View and Controlle
`‘inally.¢
`4ndtheir
`Properties
`illustrate the MVC Concept. The first ex: Bleae
`are
`Sliven for the
`MVCtriad in the Smalltalk Systemth
`ee prone Siven that
`(in Section 9.6.4) createstammean
`‘Y:9) Uses an existing
`Simple.
`a
`Y
`aes
`:
`4 new (and even Simpler) we abs i
`MVEtri:
`sion of what actually happen
`cond example
`S whenthis MVC; my
`ailed discus.
`Section 9.6.5. The third example illustrates &
`ation is invoked is given in
`tigating the properties of any MVC triad. Opening an insy
`luable tool for inves.
`F
`eeeate:
`€ use Of a va
`:
`&
`a.
`;
`eax
`~
`|SP€Ctor on a MVEtriad is
`discussed in Section 9.6.6
`Interaction of model, view, and Controller
`The three components of the MVC tri
`ad have the following functionality and
`properties:
`= model—an object that repre
`sents the data to be displ ayed. The model can
`be an instance of any appro
`Priate class that represe nts the data most effi-
`ciently. For simplicity and
`classes that can serve as mo
`reference to its view or co
`contains information
`relative to the amount of data to be displ:ayed ina view, it is often desir-
`able to add a methodfor computing a bounding boxt
`o the modelprotocol.
`ws view—an object that is the visua
`of the data represented Dane
`| display
`model. Protocol in the view subclass determines how the data are to be
`displayed. Keeping the MVCtriad togetheras a family with consistent in-
`formationis the primary responsibility of the view. Private data within the
`view protocolare used to connectthe view with its model and controller.
`A view consists Of a top view and zero or more subviews. In many cases
`the top view is an instance of StandardSystemView. This has the advan-
`tage of providing the standard blue button menu options for ee
`framing, moving,etc., for the new view. There are a number ofkey on 5
`
`9.6.1
`
`ods in View that need to be redefined in a new subclass of View. These
`include displayView, defaultWindow, and defaultControllerClass.
`
`a controller—an object that provides the protocol for user ineaeie
`the view andits model. Pro
`:
`fe
`i
`i
`tocol in the controller subclass pr
`i
`ovides m
`and action messages for
`>
`da ee
`the view and its model. Priva
`te data within th
`controller protocol are used to connect the controller with me nae
`iew. The controller maintains an interface with the con ae eyview. cae
`
`
`(
`for coordination with other active controllers. In most
`Cas
`|
`
`i
`
`
`
`Page 4 of 5
`
`Page 4 of 5
`
`
`
`:
`
`Ss
`
`ine!
`
`:
`ired to inv
`
`!
`
`ications are
`
`i
`
`;
`
`
`
`De ntronier)
`;
`a
`isomeonuc Controller (sce Figure 9.1),
`“subewe of all contredefinition in most subclasses inctuee
`supe plier that ieeejntrolActive: controlInitialize, and controrr,,
`r the operation of MVCtriads ig g: .
`nMenu,
`aan
`yellowBut
`#5 [0
`en
`feven
`bef
`More detailed
`‘
`al in nature.
`€d
`expla,
`-
`lon,
`:
`Sed Mere are gener MVC application are given insea ;
`The basic
`an
`fore
`oke
`"5
`the exact Ste
`fe
`ked with instance creation Metho,
`te New Apppplication. sending2i ae seas tO thevigg the
`sem
`view class ofvee the view, display OF
`t ae kea© Of
`con rae .
`ee Fe.oe the pplication. ee this an a S In the vi
`go
`ae conc hierarchy that are part ve a 96e f
`foes detaile ang
`.
`eae! ee key methods1S a ae
`OO
`TOC BE TIEStOgemMy,
`.
`ssion Of te~
`:
`Ore
`C
`oe le presented in Section ?
`F
`ieenionaclal
`
`examp ed toalist &© triad is preaved, its) cOnLOUCH isha
`
`MV!
`an instance variable, scheduledControj. ed.re
`2. When anew
`uled controllersOar “ai global variable ScheduledControtiers e in
`cae en ofControIManager. protocolin ControlManagerprovide,
`single esocessing, scheduling, and modifying any Controllerin the lst
`Paledcontrollers. This is accomplished by sending 4Ppropriate fe }
`sages to ScheduledControllers
`thee eed of ControlManager, COnstany,
`meeeeeens of the cunses and the state of the mouse iia. |
`
`
`Whenthe cursoris moved within a view anda button is Clicked, Scheduleg,
`
`Controllers gives control to the controller for that view. The controller¢,.
`the view is established as the value of another instance variable,act
`
`Controller, in the control manager.
`
`When a controller becomes the active controller, it rec
`
`sequence of messages from the startup message to acti
`
`:
`
`¢
`
`S
`
`ollers,
`
`self controlInitialize.
`self controlLoop.
`self control Terminate.
`
`
`
`The active controller retains control and
`
`linquishes control. Of course, the user ca:
`and click a mouse button to terminate
`
`
`Control can also be terminated by pres
`board. The details of the controlLoop
`
`
`
`controlLoop
`self isControlActive whileTrue
`Processoryield.
`s
`
`
`
`
`
`Page 5 of 5
`
`Page 5 of 5
`
`