• 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: Obj-C NSRect methods help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obj-C NSRect methods help


  • Subject: Re: Obj-C NSRect methods help
  • From: Andrew Farmer <email@hidden>
  • Date: Tue, 11 Jan 2005 19:53:24 -0800

On 11 Jan 2005, at 19:18, Mark Dawson wrote:
If I want to compare two NSRect pieces, I thought I could do the following (modification of the Sketch example program):

	if (![_bounds.origin isEqualToPoint:_shadowBounds.origin])

where
    NSRect _bounds;
	NSRect _shadowBounds;

I get the following errors:

DocumentModel.subproj/SKTGraphic.m:74: warning: invalid receiver type `untagged struct '
DocumentModel.subproj/SKTGraphic.m:74: warning: cannot find method `-isEqualToPoint:'; return type `id' assumed
DocumentModel.subproj/SKTGraphic.m:74: error: cannot convert to a pointer type


I know NSRect is a struct; however, NSPoint is an object

Nope, NSPoint is a struct, something along the lines of:
typedef struct {
	float x, y;
} NSPoint;

Attachment: PGP.sig
Description: This is a digitally signed message part

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Obj-C NSRect methods help (From: Mark Dawson <email@hidden>)

  • Prev by Date: Re: Example needed to show how to overlay images upon a single view
  • Next by Date: How to remove the quit menu item of the Doc menu of an application?
  • Previous by thread: Re: Obj-C NSRect methods help
  • Next by thread: Re: Obj-C NSRect methods help
  • Index(es):
    • Date
    • Thread