• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: passing NSRect struct as an arg
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: passing NSRect struct as an arg (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: passing NSRect struct as an arg
  • Next by Date: Re: Writing nested dictionary fails
  • Previous by thread: Re: passing NSRect struct as an arg
  • Next by thread: Re: passing NSRect struct as an arg
  • Index(es):
    • Date
    • Thread