Hi,
awesome!
So is the attached patch OK? (Not sure why a method like this exists
at all, but hey.)
Lubos
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.
David
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? :-)