Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!hsdndev!dartvax!eleazar.dartmouth.edu!watt From: watt@eleazar.dartmouth.edu (Gill Watt) Newsgroups: comp.sys.mac.programmer Subject: Re: TCL limitations question (long but worth it)... Summary: see subj Keywords: TCL, OOPS, CColorWindow Message-ID: <1991Jun6.173015.17804@dartvax.dartmouth.edu> Date: 6 Jun 91 17:30:15 GMT Sender: news@dartvax.dartmouth.edu (The News Manager) Distribution: comp Organization: Dartmouth College, Hanover, NH Lines: 33 Thanks to everyone who sent me advice about the Think Class Libraries. Yes, the problems can be worked around by casting the CColorWindow object to a CWindow before assigning it to the CDirector's *itsWindow. As follows: itsWindow = (CWindow *) new ( CColorWindow ); I have also found this technique to be helpful in other places where I would like to enhance the functionality of the pre-existing classes without disturbing them. After initializing, I just cast my objects into their superclass for passing around the class library and whenever I require the additional methods, I recast them back into my own subclass. Summary: It's cool, it's powerful, and I can't help but think that it is a dangerous kludge. Why can't we have OOP for the mac without a spiders web of interdependencies between classes? Thanks again. -Gill -- --------------------------------------------------------------------- Gill Watt (watt@eleazar.dartmouth.edu) Thayer School of Engineering, Dartmouth College, Hanover, NH 03755 ---------------------------------------------------------------------