Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!hudson.lm.com!newsfeed.pitt.edu!gatech!swrinde!cs.utexas.edu!utnut!nott!cunews!perlis!valenta
From: valenta@scs.carleton.ca (michael valenta)
Subject: Re: Smalltalk/V Mac problem
Message-ID: <CxMFwp.58p@cunews.carleton.ca>
Sender: news@cunews.carleton.ca (News Administrator)
Reply-To: valenta@scs.carleton.ca
Organization: School of Computer Scince, Carleton University, Ottawa, Canada
References: <macgremd-121094101119@ck43617516z.open.ac.uk>
Date: Thu, 13 Oct 1994 17:14:49 GMT
Lines: 33

In article 121094101119@ck43617516z.open.ac.uk, macgremd@open.ac.uk () writes:
> You can create a TextWindow by executing:
> 
> | aWindow |
> aWindow := TextWindow
>     openOn: '' label: 'first window' 
> 
> Say you create a sub-class of TextWindow called TextApp,which is
> basically empty i.e. it inherits all methods and variables from
> its superclasses. Now you execute the identical code:
> 
> | aWindow |
> aWindow := TextApp
>     openOn: '' label: 'first window' 
> 
> You get an error "includes: not understood". I would have thouigh the
> latter
> code would have had the same effect as the former? Can anyone explain to
> this newbie why it is not so?

I believe the solution to the problem is to execute the following:

	TextApp initialize

The reason this is needed is because a TextWindow (and many other classes
in ST/V Mac) have a collection of supported events which are stored in a class
variable. Whenever a new subclass is created, the events the new class supports 
must be initialized by sending the initialize method to the new class. 


Mike Valenta  


