Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Is it me or XCode 1.2?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it me or XCode 1.2?



No... I don't think so as 'tNode' has a valid set of values at the line below marked by '<<<<<<'.
Again, if I run the code it runs, if I try to step thru it with the debugger, I get the error.


On Apr 24, 2004, at 7:41 PM, Brent Gulanowski wrote:


It would appear that your tree is returning an uninitialized pointer value. Is that possible?



On Apr 24, 2004, at 12:57 AM, Phil Curry wrote:

I could have sworn this code worked before moving to Xcode 1.2
But now, if I build/run it runs without error. If I build/debug, the identifier 'node' in the line:
if ( [node numChildren] > 0) {
shows node has a value of 0x7 and I get a bad EXC_BAD_ACCESS if I try to step through that line.


Why would it execute but not be valid if I step through with the debugger?

Thanks.
-Phil
===========================================
- (void)drawRect:(NSRect)canvas
{
// locals
   int i;
   Node* tNode;

// body
   [self describeGrid];
   [self drawBackground];
   [self resetRightMostNode];
   for ( i = 1; i >= 0; i-- ) {
      tNode = [tree objectAtIndex:i];  //  <<<<<< tNode valid here
      [self setXForNode:tNode];
   }
<snip>
}  // drawRect


- (void)setXForNode:(Node*)node { // locals int i; NSNumber* num;

// body
   if ( [node numChildren] > 0) {        // <<<<<< node invalid here
      for ( i = 0; i < [node numChildren]; i++ ) {
         [self setXForNode: [[node children] objectAtIndex:i]];
      }  // for

[node setXPosition: [[[node children] objectAtIndex:0] position].x];
} // if
<snip>
} // setX
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.



--
Brent Gulanowski				email@hidden
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Is it me or XCode 1.2? (From: Phil Curry <email@hidden>)
 >Re: Is it me or XCode 1.2? (From: Brent Gulanowski <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.