New Cocoa headers

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

New Cocoa headers

Zoë Peterson
I just updated to the newer Cocoa headers (Thanks Jonas!) and I've run
into a problem with Lazarus.

NSExtensionContext.inc includes this line:

{$if
defined(__OBJC2__)defined(interface)defined(NSExtensionContext)defined(NSObject)}

It compiles ok for some reason, but screws up Code Tools so things like
jump to inherited don't work on subclasses of AppKit defined Objective-C
classes.

Is that line correct?  Do it (and other places that have the same
construct) need to be fixed or does Code Tools need to be updated to
understand it?

It exists in the GitHub version of the headers too.

Thanks!

--
Zoë Peterson
Scooter Software

_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: New Cocoa headers

Jonas Maebe-3
On 22/08/2019 20:15, Zoë Peterson wrote:

> I just updated to the newer Cocoa headers (Thanks Jonas!) and I've run
> into a problem with Lazarus.
>
> NSExtensionContext.inc includes this line:
>
> {$if
> defined(__OBJC2__)defined(interface)defined(NSExtensionContext)defined(NSObject)}
>
>
> It compiles ok for some reason, but screws up Code Tools so things like
> jump to inherited don't work on subclasses of AppKit defined Objective-C
> classes.
>
> Is that line correct?

Syntactically, yes: Borland-style compilers (and hence FPC as well)
ignore all invalid tokens/characters at the end of an $if/$if(n)def
directive. So the above is equivalent to {$if defined(__OBJC2__)}.

> Do it (and other places that have the same
> construct) need to be fixed or does Code Tools need to be updated to
> understand it?

The latter definitely. The former, possibly as well (although the
compiler currently never defines __OBJC2__, so it won't make a
difference at this time).


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: New Cocoa headers

Ryan Joseph-2
In reply to this post by Zoë Peterson


> On Aug 22, 2019, at 2:15 PM, Zoë Peterson <[hidden email]> wrote:
>
> I just updated to the newer Cocoa headers (Thanks Jonas!) and I've run into a problem with Lazarus.

The headers were updated? to which version? I did my last parse on 10.10, so 4 years ago.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: New Cocoa headers

Jonas Maebe-3
On 24/08/2019 16:07, Ryan Joseph wrote:
>
>
>> On Aug 22, 2019, at 2:15 PM, Zoë Peterson <[hidden email]> wrote:
>>
>> I just updated to the newer Cocoa headers (Thanks Jonas!) and I've run into a problem with Lazarus.
>
> The headers were updated? to which version? I did my last parse on 10.10, so 4 years ago.

To the 10.10 headers (with some fixed). I also submitted a few pull
requests for your parser to fix a couple of bugs in it that I discovered
in the process: https://github.com/genericptr/Framework-Parser/pulls


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal