Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!news.sprintlink.net!EU.net!chsun!hslrswi!news
From: dbrunner@hasler.ascom.ch (Dierk Brunner)
Subject: Re: Window scheduling in VW1.0
Message-ID: <1995Jan30.095437.13897@hasler.ascom.ch>
Sender: news@hasler.ascom.ch
Reply-To: dbrunner@hasler.ascom.ch
Organization: Ascom Hasler AG, CH-3014 Bern, Switzerland
References: <INFO-CLS%95012511551107@VM.GMD.DE>
Date: Mon, 30 Jan 1995 09:54:37 GMT
Lines: 43

In article 95012511551107@VM.GMD.DE, "Y.Li" <Y.Li@OPEN.AC.UK> writes:
>I am trying to understand how a window in Visualworks is scheduled and opened
>but I met some difficulties.
>
>The method: 'openIn:' in class ScheduledWindow is supposed to open a window.
>Looking at the code in the method, one can see that it sends a message:
>'schedulePassive: aController' to ScheduledController (other part of the code
>seems not so important), however, the 'scheduledPassive' method only adds the
>window's controller to the begining of the queue. So how is a window really
>open?

The window is opened by the method #privateOpenForced: and the method
#schedulePassive: adds the controller of that window to the ordered collection
of controllers that are scheduled by Smalltalk.

>The next relevant question is: if a window gives up control, how exactly
>another window takes over the control? Where is the code to do it? Is this job
>done by the VM? I tried to use the debugger to step through the code execution,
>however, when it executed to the method 'scheduledPassive', the system hang.

When a window gives up control, the control manager instance stored in the
global variable #ScheduledControllers searches in the list of controllers for
the first controller that answers the question #isControlWanted with true and
gives control to that controller by sending the message #startUp to it.
The controller keeps control until the controller returns false when it
is asked #isControlActive.

>Could somebody tell me how the process is completed? Any help is greatly
>appreciated.
>
>Yibing Li
>
>PS. Because of a network problem on our campus, this message may get sent
>twice.
>I appologize if that happens.


-------------------------------------------------------
Dierk Brunner / NVEK3, Ascom Hasler AG, Belpstrasse 37,
    CH-3000 Berne 14, Switzerland, +41 31 999 2063
-------------------------------------------------------


