rococoa icon indicating copy to clipboard operation
rococoa copied to clipboard

Support for Objective-c function with block completion handler

Open cy745 opened this issue 5 months ago • 1 comments

Hello, i'm implementing a function in MPMediaItemArtwork

- (instancetype) initWithBoundsSize:(CGSize) boundsSize 
                     requestHandler:(NSImage * (^)(CGSize size)) requestHandler;

There is a block parameter in the function, and i have no idea how to create a block with Rococoa, i do know how to create a target-action callback, can we convert a target-action callback to block? Is there any way or any possible to achieve it? @dkocher

cy745 avatar Aug 13 '25 04:08 cy745

From my understanding this depends on upstream ^1 changes.

dkocher avatar Aug 13 '25 06:08 dkocher