• 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
passing NSRect struct as an arg
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

passing NSRect struct as an arg


  • Subject: passing NSRect struct as an arg
  • From: crucial felix <email@hidden>
  • Date: Mon, 16 Dec 2002 20:36:57 -0500

first of all thanks for all the archives, i've been reading them a lot.

question:
in a view subclass i obtain my bounds:

NSRect bounds = [self bounds];

size is: 480 x 276

pass it to an object that draws:

[sfp drawWaveformFrom:0.0 to: [sfp duration] inRect: bounds];

SFP:
-(void)drawWaveformFrom: (float)start to:(float)end inRect:(NSRect)rect
{
NSLog(@"rect: %f %f",rect.size.width, rect.size.height);

..
}


and when it gets there its garbage
x: 3.5 y: -3.68934881e+19 size: 0 x 0


sorry if this is obvious, but web and archive searching hasn't solved it for me.

should it be:

[sfp drawWaveformFrom:0.0 to: [sfp duration] inRect: &bounds];


-(void)drawWaveformFrom: (float)start to:(float)end inRect:(NSRect*)rect


?



-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.

  • Follow-Ups:
    • Re: passing NSRect struct as an arg
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Size limit for NSData.
  • Next by Date: Re: Tooltips - what a pathetic joke... :)
  • Previous by thread: Re: Size limit for NSData.
  • Next by thread: Re: passing NSRect struct as an arg
  • Index(es):
    • Date
    • Thread