rabbit@eddie.MIT.EDU (Warren J. Madden) (09/13/89)
Greetings! I am developing an application on a Mac II using the Think Class Library for Think C 4.0, and have run into a problem in debugging objects. Specifically, how does one examine the values of an object's instance variables when the program is in another object's method? Say I want to keep track of an instance variable in object A. I can look at that var as long as I'm in the code of any method belonging to A. But as soon as I go to any other object's method, that variable becomes inaccessible. I've tried working my way down from the gApplication global, but hit a dead end when trying to get at the members of the itsDirectors CCluster. A second question regards instance variables is best asked through example. A CDocument contains the instance variable itsMainPane, which is a CPane. In the Starter example code, this variable is set to an object of type CPanorama, which is a subclass of CPane. OK, say that I open itsMainPane to examine it. It opens up just fine, but only displays the instance variables for CPane. How do I examine the additional variables that CPanorama adds? I have experimented with various means of casting itsMainPane to CPanorama, with no success. Am I missing something obvious? Any help on this would be greatly appreciated. I've got a variable changing on me when I can't look at it, and I need to know what is changing it. Thanx in advance, Warren J. Madden rabbit@eddie.mit.edu ...!eddie!rabbit DISCLAIMER: This article stated only facts, not opinions. Why should I disclaim the truth? :-)