Can somebody apply the patch at
https://bugs.freepascal.org/view.php?id=33124
it's nothing serious, only a missing Cocoa header definition.
Ondrej

Mailing lists / fpc-devel / 2018-03
13 messages · 4 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Can somebody apply the patch at
https://bugs.freepascal.org/view.php?id=33124
it's nothing serious, only a missing Cocoa header definition.
Ondrej
Those headers have been generated automatically. They should never be manually patched. Updated versions are indeed needed, but that will probably take quite a bit of work. I don't even know where the latest version of the header conversion tool is hosted, or which OS headers are the latest version it works with.
Jonas
Is there a chance you could take a look at it and update the header definitions at some point? We need them for Cocoa updates in the LCL.
For now I solved it with this extension class:
NSWindow = objcclass external(CocoaAll.NSWindow)
function backingScaleFactor: CGFloat; message 'backingScaleFactor';
end;But it means a lot of code noise in LCL sources (see the same revision) :/
Ondrej
I'm not sure. I've found the latest location of the parser though: https://github.com/genericptr/Framework-Parser
There's also a parsed version of the OS X 10.10 Cocoa headers: https://github.com/genericptr/MacOS_10_10
If they work for you and you can provide a patch, I can replace the current version of the headers in the FPC repository with these ones.
Jonas
I'm not sure either that I can provide a patch. Does really nobody maintain the headers? Who wrote the parser tool? Who committed the headers to SVN?
Ondrej
Ondrej Pokorny wroteI'm not sure either that I can provide a patch. Does really nobody maintain the headers? Who wrote the parser tool?
Ryan Joseph.
Who committed the headers to SVN?
I did and gave Ryan svn access, but he never updated them there.
Jonas
Can somebody apply the patch at https://bugs.freepascal.org/view.php?id=33124 it's…
It's better, if you declare those methods as an objccategory in cocoa_extra.pas
In that case there would be no requirements regarding a certain FPC and/or headers version for LCL to compile.
Also, please check if a class supports those methods before calling them. Otherwise 10.7 would be the minimum macOS version required for LCL (afaik, it's still 10.5 as of today)
Earlier versions might experience an error like shown in this thread: http://forum.lazarus.freepascal.org/index.php/topic,40934.0.html
thanks
Dmitry
Ryan Joseph. I did and gave Ryan svn access, but he never updated them there. Jonas
Thank you. I found his homepage
http://www.pascal-central.com/gladiator.html and asked him to update the headers. Hopefully he is still around.
Ondrej
It's better, if you declare those methods as an objccategory in cocoa_extra.pas In that…
Good. I added the missing header definition to LCL in r57240. Could you please review the revision and eventually fix it, if needed?
Also, please check if a class supports those methods before calling them.
How is it done?
Ondrej
Ondrej Pokorny wroteGood. I added the missing header definition to LCL in r57240. Could you please review the revision and eventually fix it, if needed?
r57677
reviewed and fixed. Also added support for the
deprecated userSpaceScaleFactor (which was in todo for that)
How is it done?
respondToSelector instance method
https://developer.apple.com/documentation/objectivec/1418956-nsobject/1418583-respondstoselector?language=objc
or instancesRespondToSelector class method.
https://developer.apple.com/documentation/objectivec/nsobject/1418555-instancesrespondtoselector?language=objc the later is rarely used.
thanks,
Dmitry
Thank you.
Ondrej
It's better, if you declare those methods as an objccategory in cocoa_extra.pas In that…
I find it interesting that manual patching of FPC header definitions is forbidden, which force us to manually patch the LCL code base :)
Anyway, my email to Ryan Joseph
http://www.pascal-central.com/gladiator.html came back as undelivered.
Ondrej
Hi,
On 2018-04-25 09:47, Ondrej Pokorny wrote:
< snip >
Anyway, my email to Ryan Joseph http://www.pascal-central.com/gladiator.html [2] came back as undelivered.
I see one Ryan Joseph in fpc-pascal list . Maybe he is the same ?
regards,