• 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: Question about respondsToSelector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about respondsToSelector


  • Subject: Re: Question about respondsToSelector
  • From: "Jonathan del Strother" <email@hidden>
  • Date: Tue, 19 Aug 2008 14:55:55 +0100

On Tue, Aug 19, 2008 at 2:33 PM, Carmen Cerino Jr. <email@hidden> wrote:
> Sorry about the sketchy details. Basically I have a wrapper class for the
> Sequence Grabber, and I want to setup a delegate for the decompression
> callback.
>
> This is where I use the respondsToSelector method:
> static void SGVideoDecompTrackingCallback(
>                void *decompressionTrackingRefCon,
>                OSStatus result,
>                ICMDecompressionTrackingFlags decompressionTrackingFlags,
>                CVPixelBufferRef pixelBuffer,
>                TimeValue64 displayTime,
>                TimeValue64 displayDuration,
>                ICMValidTimeFlags validTimeFlags,
>                void *reserved,
>                void *sourceFrameRefCon )
> {
> #pragma unused(reserved)
> #pragma unused(sourceFrameRefCon)
>
>        SGVideo* sgVideoChan = (SGVideo*)decompressionTrackingRefCon;
>        id _delegate = sgVideoChan.delegate;
>
>        if (result == noErr){
>
>        if ([_delegate respondsToSelector: @selector(SGDecompDataProc:)]){
>
>            [_delegate SGDecompDataProc:pixelBuffer
>              trackingFlags:decompressionTrackingFlags
>              displayTime:displayTime
>              displayDuration:displayDuration
>              validTimeFlags:validTimeFlags];
>        }
>    }
> }
>
>
> Header file where the function I am checking is prototyped:
>
> @interface VideoController : NSObject {
>        SeqGrab* mSeqGrab;
>        SGVideo* mVideoChan;
>        IBOutlet SampleCIView* mPreview;
> }
>
> -(void)SGDecompDataProc: (CVPixelBufferRef)pixelBuffer
> trackingFlags:(ICMDecompressionTrackingFlags)decompressionTrackingFlags
> displayTime:(TimeValue64)displayTime
> displayDuration:(TimeValue64)displayDuration
> validTimeFlags:(ICMValidTimeFlags)validTimeFlags;
>
>
> @end
>
> Please let me know if you need to see anything else. Once again I apologize
> for the sketchy details.
>
> Thank you all for your help!

Heya - that's not the entire selector.  You want to use :

if ([_delegate respondsToSelector: @selector(SGDecompDataProc:
trackingFlags: displayTime: displayDuration: validTimeFlags:)]) {
...
}
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Question about respondsToSelector
      • From: "Carmen Cerino Jr." <email@hidden>
References: 
 >Question about respondsToSelector (From: "Carmen Cerino Jr." <email@hidden>)
 >Re: Question about respondsToSelector (From: Andy Lee <email@hidden>)
 >Re: Question about respondsToSelector (From: "Carmen Cerino Jr." <email@hidden>)

  • Prev by Date: Re: Question about respondsToSelector
  • Next by Date: Re: Question about respondsToSelector
  • Previous by thread: Re: Question about respondsToSelector
  • Next by thread: Re: Question about respondsToSelector
  • Index(es):
    • Date
    • Thread