Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!yale!cs.yale.edu!cs.yale.edu!pittenger-laurence From: pittenger-laurence@cs.yale.edu (Laurence Arthur Pittenger) Newsgroups: comp.sys.mac.programmer Subject: More C+- woes: HELP Summary: problems in method calling Keywords: C+- method inherited Message-ID: <1991Apr28.130424.10894@cs.yale.edu> Date: 28 Apr 91 13:04:24 GMT Sender: news@cs.yale.edu (Usenet News) Distribution: comp.sys.mac.programmer Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158 Lines: 21 Originator: pitteng@hare.CS.Yale.Edu Nntp-Posting-Host: hare.zoo.cs.yale.edu I have an object, call it myObject, with a descendant, call it myChild. Both support a method, call it MyMethod. in myChild, I want to call on MyMethod in myObject, so I write inherited::MyMethod(...) and it works fine. In myObject, I want MyMethod to call on itself sometimes. Since the MyMethod is sometimes called from myObject and sometimes from myChild, I can't merely call "MyMethod" or "this->MyMethod", because in the case of the myChild it will go back to myChild::MyMethod rather than myObject::MyMethod, which is what I want. So, following the (very sparse) documentation in the Think C documentation, I call "myObject::MyMethod(...)". The result? The compiler returns "invalid method call" (or something approximating that msg). HUNH?!! thanks in advance, LP -- Laurence A. Pittenger CSNET : pittenger-laurence@cs.yale.edu BITNET : pitlaua@yalevm , pittenger-laurence@yalecs