• 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: How to avoid warning with objc_msgSend
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to avoid warning with objc_msgSend


  • Subject: Re: How to avoid warning with objc_msgSend
  • From: m <email@hidden>
  • Date: Tue, 5 Oct 2004 02:34:55 -0700

On Oct 5, 2004, at 1:46 AM, Ryan Norton wrote:

One way I've figured out how to do it -
//getRectsBeingDrawn:count: is a optimization that is only available on
//Panther (10.3) and higher. Check to see if it supports it -
if ( [GetNSView() respondsToSelector:@selector(getRectsBeingDrawn:count:)] ) objc_msgSend(GetNSView(),@selector(getRectsBeingDrawn: count:),&rects,&countRects);

In this case though it's a runtime check from a function that gets called quite a bit...

I'm skeptical that checking whether a selector is implemented could be a significant part of your total execution time. In any case, you really only need to check whether getRectsBeingDrawn:count: is implemented once, not every time you want to call it.

_murat

_______________________________________________
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: 
 >Re: How to avoid warning with objc_msgSend (From: Ryan Norton <email@hidden>)

  • Prev by Date: Re: How to avoid warning with objc_msgSend
  • Next by Date: Re: Equivelent to drawRect: for drawing after sub views are drawn
  • Previous by thread: Re: How to avoid warning with objc_msgSend
  • Next by thread: Re: How to avoid warning with objc_msgSend
  • Index(es):
    • Date
    • Thread