[Top][All Lists]

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

Re: gnustep-gui and blocks support

From: David Chisnall
Subject: Re: gnustep-gui and blocks support
Date: Wed, 19 Jun 2013 18:22:36 +0100

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:

> Hi,
> 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? :-)
> -- 
> Luboš Doležel
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden

-- Sent from my Cray X1

reply via email to

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