• 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: AffineTransform copying bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AffineTransform copying bug?


  • Subject: Re: AffineTransform copying bug?
  • From: Finlay Dobbie <email@hidden>
  • Date: Sun, 13 Jun 2004 01:45:36 +0100

On 13 Jun 2004, at 01:31, John Timmer wrote:

NSAffineTransform *tempTransform = [[scaleTransform copy] invert];

-(void)invert is a void function, so attempting to assign its return value to tempTransform is incorrect. The compiler should warn you about this.

If, on the other hand, I do this:
NSAffineTransform *tempTransform = [[scaleTransform copy] autorelease];
[tempTransform invert];

-(id)autorelease returns the object you called it on, so it is valid to assign its return value to tempTransform.

-- Finlay
_______________________________________________
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: 
 >AffineTransform copying bug? (From: John Timmer <email@hidden>)

  • Prev by Date: Re: Big Nerd Ranch Experience
  • Next by Date: Re: Big Nerd Ranch Experience
  • Previous by thread: AffineTransform copying bug?
  • Next by thread: Re: doubling up a NSCell for an NSTableColumn
  • Index(es):
    • Date
    • Thread