[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnustep-gui and blocks support

From: Luboš Doležel
Subject: Re: gnustep-gui and blocks support
Date: Thu, 20 Jun 2013 17:05:48 +0200
User-agent: Roundcube Webmail/0.5



So is the attached patch OK? (Not sure why a method like this exists at all, but hey.)


On Wed, 19 Jun 2013 18:22:36 +0100, David Chisnall wrote:
Hi Lubos,

Take a look in -base.  I wrote some support stuff that makes this
easy.  There's a macro for declaring block types and another for
invoking them.  These work with clang and gcc (you can only create
blocks with clang, but you can call them via the macros).  It's
recommended to build -base with clang if you want to use blocks, or
you'll end up with the runtime detecting type mismatches on selectors,
but it will still work if you compile it with gcc.


On 19 Jun 2013, at 18:19, Luboš Doležel <address@hidden> wrote:


I was playing around with NSSavePanel and noticed gnustep-gui doesn't support methods such as

- (void)beginSheetModalForWindow:(NSWindow *)window completionHandler:(void (^)(NSInteger result))handler

I also couldn't find any other method that would use blocks. Since there already is blocks support in libobjc2, it's a shame.

Now I understand that blocks support is something that needs to be detected and enabled by configure, so that runtimes/compilers without blocks still work.

Well, I don't feel up to the task of doing the detection, but would like to contribute methods like the one above. Could someone else please introduce the required changes? :-)

Attachment: savepanel-block.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]