Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!sco!jamesm From: jamesm@sco.COM (James M. Moore) Newsgroups: comp.sys.mac.programmer Subject: Possible (minor) Think C 4.0 debugger problem - one line funcs Message-ID: <7726@viscous.sco.COM> Date: 29 Nov 89 19:24:52 GMT Sender: news@sco.COM Reply-To: jamesm@sco.COM (James M. Moore) Organization: An tOibriu Santa Cruz Lines: 25 Ran into a strange problem with the Think 4.0 debugger last night. I was working on a styled text edit class as a subclass of CEditText, and had several stub routines that did nothing, declared like so: void BStylEditText::InsertText(Ptr data, long length) {}; with the entire function on one line. The problem was that when I stepped into the InsertText routine, the debugger indicated I was at a totally different point in my code, and then proceeded to crash in various mysterious ways. Taking a closer look, I saw that the debugger wasn't putting triangles next to the one-line procedures. Adding a return in between the curly braces made the problem go away, and the code now seems to be working fine. I'm not entirely convinced myself that this is real; it's possible that something else I changed is actually responsible for solving the problem. But it sure looks like this is the cause. In any case, if you're having bizarre problems with calling the wrong method, and you've got one-liners like this, toss in a return and see if that solves the problem. -- James Moore | Nil aon .sig maith agam anois - Santa Cruz Operation UNIX Tech Support | B'fheidir an tseachtaine seo jamesm@sco.com | chugainn.