gnustep-dev
[Top][All Lists]
Advanced

[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: Thu, 20 Jun 2013 16:10:55 +0100

Yup, looks good to me,

David

On 20 Jun 2013, at 16:08, Luboš Doležel <address@hidden> wrote:

> Oops, the patch obviously disregards the window argument, it should instead 
> use
> 
> [NSApp runModalForWindow: self
>        relativeToWindow: window]
> 
> Luboš
> 
> On Thu, 20 Jun 2013 17:05:48 +0200, Luboš Doležel wrote:
>> 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? :-)
> 
> -- 
> Luboš Doležel
> 
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnustep-dev



--
This email complies with ISO 3103




reply via email to

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