• 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: mark <email@hidden>
  • Date: Wed, 12 Jan 2005 09:06:38 -0800

Thanks for the pointer--I mistook "Object" for NSObject,

However, how does one use "isEqualToPoint"?  It only takes one parameter,
and talks about comparing against a receiver.  I thought that implied that
NSPoint was an object, not just a struct.

I'll use "NSEqualPoints", but I wanted to understand the terminologyŠ

Thank!

Mark

>
> Hello...
>
> NSPoint is also a struct.
>
> For testing equality check out the functions that
> are part of the Foundation framework, ie
> NSEqualPoints, NSEqualRects, etc...
>
> Hope that helps,
>
> Louis
>
>
>> 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, so I should be using the message
>> format, right?  I must be missing some subtle
>> pieceŠ
>>
>> Thanks for any enlightenment!
>>
>> Mark
>>
>

 _______________________________________________
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

  • Follow-Ups:
    • Re: Obj-C NSRect methods help
      • From: Andy Lee <email@hidden>
    • Re: Obj-C NSRect methods help
      • From: Shawn Erickson <email@hidden>
References: 
 >Re: Obj-C NSRect methods help (From: "Louis C. Sacha" <email@hidden>)

  • Prev by Date: Re: How to remove the quit menu item of the Doc menu of anapplication?
  • Next by Date: Re: Obj-C NSRect methods help
  • Previous by thread: Re: Obj-C NSRect methods help
  • Next by thread: Re: Obj-C NSRect methods help
  • Index(es):
    • Date
    • Thread