Re: passing NSRect struct as an arg
Re: passing NSRect struct as an arg
- Subject: Re: passing NSRect struct as an arg
- From: crucial felix <email@hidden>
- Date: Mon, 16 Dec 2002 21:16:56 -0500
an astounding 14 minutes later, John C. Randolph wrote:
Looks like you're examining the values before you've executed the
first line in the function.
the NSRect is an arg being passed in, shouldn't the value be correct
yet ?
i'm running it in the debugger.
What happens when you do this:
(an additional check here:)
- (void)drawRect:(NSRect)rect {
if(sfp) {
NSRect bounds = [self bounds];
NSLog(@"bounds: %f %f",bounds.size.width, bounds.size.height);
[sfp drawWaveformFrom:0.0 to: [sfp duration] inRect: bounds];
}
}
2002-12-16 21:05:45.441 crucial[6824] bounds: 480.000000 276.000000
-(void)drawWaveformFrom: (float)start to:(float)end inRect:(NSRect)rect
{
NSLog(@"start: %f" end:%f", start, end);
NSLog(@"rect: %f %f",rect.size.width, rect.size.height);
NSLog(@"about to leave the method.."); // break here.
..
}
2002-12-16 21:00:28.372 crucial[6795] start: 0.000000 end:162.776962
2002-12-16 21:00:31.774 crucial[6795] rect: 0.000000 0.000000
2002-12-16 21:00:42.525 crucial[6795] about to leave the method..
very strange.
i'm stepping it in the debugger, so its not going anywhere other than
to the
drawWaveformFrom:to:inRect: method.
thanks again.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
-felix
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.