Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!samsung!munnari.oz.au!caw From: caw@munnari.oz.au (Chris Wright) Newsgroups: comp.sys.mac.programmer Subject: Casts and Think C - Thanks and one little ?... Keywords: Cast ThinkC Message-ID: <6225@munnari.oz.au> Date: 8 Dec 90 09:11:02 GMT Sender: news@cs.mu.oz.au Lines: 29 Thanks to all the people who have taken the trouble to answer the initial question about casting in Think C, and static binding in general. My confusion stems from having used Smalltalk and Scheme (SCOOPS), and K & R C. I combined these two for my mental model of Object C, and C++, and got it all very wrong! Second, if I've got any more questions, I'll move them over to comp.lang.c++, or comp.lang.objectsomething.... Third, just one more question! If gApplication is still a CApplication at compile time (which makes sense), then I can see the need for the cast in ((CEditApp *) gApplication) -> IEditApp; and I can see that gApplication -> Run(); doesn't need a cast, 'cos CApplication has a Run() method. But why does the correct Run() method get executed at run time.? That is, how does the compiler set it up so that CEditApp's Run() method is executed, instead of the (default) CApplication's Run() method? Thanks for your patience! chris.