Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!pacbell.com!ames!uhccux!munnari.oz.au!caw From: caw@munnari.oz.au (Chris Wright) Newsgroups: comp.sys.mac.programmer Subject: Re: Casting in Think C Summary: casting and think c Keywords: Casts ThinkC Message-ID: <6194@munnari.oz.au> Date: 6 Dec 90 11:01:21 GMT References: <6167@munnari.oz.au> <3028@skye.cs.ed.ac.uk> Sender: news@cs.mu.oz.au Lines: 18 In article <3028@skye.cs.ed.ac.uk>, nick@cs.edinburgh.ac.uk (Nick Rothwell) writes: > In article <6167@munnari.oz.au>, caw@munnari.oz.au (Chris Wright) writes: > > Why do you have to cast gApplication in ThinkC e.g.: > > extern CApplication *gApplication; > gApplication is still a CApplication, and hence doesn't have an IEditApp() > method unless you cast it. If my memory serves me correctly, gApplication is now a CEditApp. This can be checked with the member function. So it SHOULD have an IEditApp(). And the compiler shouldn't complain. Though see the kind reply from Symantec earlier in this thread (which I'm not sure if I understand!) chris.