Objective-C documentation, whats it mean?

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Simon Knight
Posts: 845
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Objective-C documentation, whats it mean?

Post by Simon Knight » Tue Nov 29, 2022 5:08 pm

Hi,

I am struggling with binding LCB script to a Objective-C method of the EventKit.

The instance method requestAccessToEntityType:completion: is documented here: https://developer.apple.com/documentati ... guage=objc

The method description contains reference to a Completion Handler which I understand to be a pointer to a block of code that gets run once the method completes. Clicking on the link on the documentation page EKEventStoreRequestAccessCompletionHandler opens a new page that describes a Type Alias : https://developer.apple.com/documentati ... guage=objc

The description of the block is "The signature for a block that EventKit calls when requesting access to event and reminder data"

Code: Select all

typedef void (^EKEventStoreRequestAccessCompletionHandler)(BOOL granted, NSError *error);
The type description lists two parameters granted and *error.
I am unclear as what is meant by the term signature. Does it mean that whatever block of code defined as the completion handler must accept the two parameters 'granted' and '*error' ?
best wishes
Skids

Simon Knight
Posts: 845
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Re: Objective-C documentation, whats it mean?

Post by Simon Knight » Thu Dec 01, 2022 10:18 am

I have managed to get the syntax correct but am still have issues which deserve a different thread.

S
best wishes
Skids

Post Reply

Return to “Mac OS”