• 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: "Carmen Cerino Jr." <email@hidden>
  • Date: Tue, 19 Aug 2008 09:33:42 -0400

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!

Carmen


On Aug 18, 2008, at 4:39 PM, Andy Lee wrote:

Also: note that method names are case-sensitive, so @selector(doSomething) is not the same as @selector(doSomeThing).

Also, if the method you are referring to takes an argument, make sure you aren't forgetting the colon at the end. The name of the method contains all its colons; @selector(doSomething) is different from @selector(doSomething:).

--Andy


_______________________________________________

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: Marcel Weiher <email@hidden>
    • Re: Question about respondsToSelector
      • From: "Jonathan del Strother" <email@hidden>
References: 
 >Question about respondsToSelector (From: "Carmen Cerino Jr." <email@hidden>)
 >Re: Question about respondsToSelector (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: Window controllers, code obfuscation
  • 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