Lazarus

Programming => Widgetset => Cocoa => Topic started by: time-killer-games on April 05, 2019, 02:29:58 am

Title: When will Cocoa be stable?
Post by: time-killer-games on April 05, 2019, 02:29:58 am
Right now, I'm only seeing 32-bit Lazarus available for Mac in the downloads. I assume because you guys are still gutting out the dependency on Carbon and replacing it with Cocoa. Is there a specific topic or blog I can look at to keep myself up to date on the stability status and release date of the Cocoa IDE and widget set? I'm honestly not even going to consider using Lazarus until I see a 64-bit download for Mac on the home page, because I consider that platform to be much more desirable than Linux, and as a standard when I make desktop software, I always want to support modern Windows, Mac, and Linux platforms at the bare minimum, if not Windows and Mac if I have no choice on dropping Linux support.
Title: Re: When will Cocoa be stable?
Post by: Leledumbo on April 05, 2019, 09:20:40 pm
http://wiki.lazarus.freepascal.org/Roadmap
Title: Re: When will Cocoa be stable?
Post by: Martin_fr on April 05, 2019, 09:39:33 pm
As far as I know, the 32bit download allows compiling to 32 ad 64bits.

The IDE also includes the cocoa code, so you can build your projects or (rebuild) the IDE for 64bit cocoa if you want.

You can then get your own impression what currently works, and what still needs to get done.
Title: Re: When will Cocoa be stable?
Post by: VTwin on April 06, 2019, 04:47:20 am
I currently compile on Win, Lin, and Mac 64 bit only. The Cocoa platform is now stable enough (beta I guess) if you use the 2.0.0 fixes svn. I assume the upcoming 2.0.2 will have incorporated most or all of these fixes.

The Roadmap is not completely up to date, for example TListView and TImageList are now working in Cocoa.
Title: Re: When will Cocoa be stable?
Post by: Leledumbo on April 06, 2019, 06:19:23 am
The Roadmap is not completely up to date, for example TListView and TImageList are now working in Cocoa.
Of course, it's manually updated after all, but at least it gets updated from time to time. Either the author of respective component or someone who knows it like you (I don't target Mac, so I don't know).
Title: Re: When will Cocoa be stable?
Post by: Hansaplast on April 06, 2019, 09:03:46 am
I currently compile on Win, Lin, and Mac 64 bit only. The Cocoa platform is now stable enough (beta I guess) if you use the 2.0.0 fixes svn. I assume the upcoming 2.0.2 will have incorporated most or all of these fixes.

The Roadmap is not completely up to date, for example TListView and TImageList are now working in Cocoa.


I agree with VTwin - I too develop for Windows, Linux and MacOS Cocoa (64 bit) and would agree that Cocoa is at least in beta phase.
The very vast majority seems to work just fine for Cocoa (thanks to all the folks for putting in the hard work!).


The only thing that is still not quite right yet, is working with visual components in the IDE, which at times has minor glitches.


As for updating the Roadmap; VTwin - maybe you and I can briefly go through the list and see what we think needs to be updated in the Roadmap? I just took a peek and for my feeling, it may need quite an update for Cocoa.
Title: Re: When will Cocoa be stable?
Post by: jwdietrich on April 06, 2019, 09:24:10 am
Unfortunately, the Cocoa widgetset isn't an official project (https://foundation.freepascal.org/projects) of the Foundation.

If you want to speed up the development of the Cocoa interface you might want start a bounty (http://wiki.lazarus.freepascal.org/Bounties#Cocoa_bounties) or to support skalogryz (https://www.patreon.com/skalogryz/posts) at Patreon: https://www.patreon.com/skalogryz/posts
Title: Re: When will Cocoa be stable?
Post by: Hansaplast on April 06, 2019, 09:36:41 am
FWIW:
I highly recommend making individual donations to Dmitry to show your appreciation or set out a bounty for him (I used PayPal a few times to send him a donation - you may want to PM skalogryz (http://forum.lazarus-ide.org/index.php?action=profile;u=13884) if you'd like to do this as well).


I myself do not like the Patreon approach (it's just a hobby for me), but Dmitry deserves a little financial support/motivation.  :D
Title: Re: When will Cocoa be stable?
Post by: AlexTP on April 06, 2019, 01:11:17 pm
>The Roadmap is not completely up to date

Updated it for Cocoa. All I could test today.
Title: Re: When will Cocoa be stable?
Post by: Wallaby on April 06, 2019, 02:07:03 pm
I highly recommend making individual donations to Dmitry to show your appreciation or set out a bounty for him (I used PayPal a few times to send him a donation - you may want to PM skalogryz (http://forum.lazarus-ide.org/index.php?action=profile;u=13884) if you'd like to do this as well).
 do not like the Patreon approach (it's just a hobby for me), but Dmitry deserves a little financial support/motivation.  :D

Good idea. I have just PMd skalogryz/Dmitry regarding financial contributions in exchange for certain Cocoa widgetset fixes and improvements.

My applications target Windows, Linux and macOS and the latter definitely needs some work. Happy to pay to see macOS support get better.

Title: Re: When will Cocoa be stable?
Post by: Leledumbo on April 06, 2019, 05:44:45 pm
>The Roadmap is not completely up to date

Updated it for Cocoa. All I could test today.
Looks almost production ready, it looks even better than Carbon in a lot of categories.
Title: Re: When will Cocoa be stable?
Post by: jwdietrich on April 06, 2019, 06:28:53 pm
Looks almost production ready, it looks even better than Carbon in a lot of categories.

That is true, but support for printing is still missing (and highly needed).
Title: Re: When will Cocoa be stable?
Post by: VTwin on April 06, 2019, 08:12:27 pm
Wow, thanks. The Roadmap looks great now. A couple of notes:

TUpDown is partially implemented, it works but does not redraw the arrows.
TToolBar seems to be working fine, but please check.
TTreeView occasionally draws text upside down, but I have not isolated that bug.

Yes, in many respects Cocoa is now better than Carbon. I used to have workarounds for controls that would fire events when set in code, a lingering Carbon bug. Excellent work on Cocoa!
Title: Re: When will Cocoa be stable?
Post by: Hansaplast on April 06, 2019, 08:27:56 pm
>The Roadmap is not completely up to date

Updated it for Cocoa. All I could test today.


Awesome!
And ... VTwin to beat me to it...  :)


Just wondering how we qualify something as "working" (I mean that as a serious question).
Do we mean "it works" even though it may not look right for the given OS/widgetset?
Or should it be fully compliant with the OS/widgetset?


I've been using TPairSplitter successfully in one of my Cocoa projects, so I've set that to "Working".

TValueListEditor, TupDown and TtoolBar work (mostly) as well even though they do not really look like they'd match the macOS style.




Note 1: I'm using Lazarus from trunk, macOS 10.14.4.


Note 2: Treeview showing occasionally upside down, see also this forum topic (https://forum.lazarus.freepascal.org/index.php?topic=41623.0).
However, I have not seen this happen on my setup in a long time.
Again: running from trunk, so maybe this has been addressed.
Title: Re: When will Cocoa be stable?
Post by: Hansaplast on April 06, 2019, 08:39:06 pm
p.s.


TPrintDialog and TPrinterSetupDialog seem to popup just fine. TPageSetupDialog does not.


Unfortunately, I haven't done much with printing under Lazarus, so I don't know if the usual suspects (canvas and such) work.
Title: Re: When will Cocoa be stable?
Post by: VTwin on April 07, 2019, 01:01:22 am
Just wondering how we qualify something as "working" (I mean that as a serious question).
Do we mean "it works" even though it may not look right for the given OS/widgetset?
Or should it be fully compliant with the OS/widgetset?

Interesting question. I assume the trade off for easy cross-platform development will be accepting some generic non-OS controls. If I run Inkscape or Gimp, for example, I'm not expecting fully OS compliant controls. That never bothers me, as long as they are recognizable and work within a common expectation. My audience is mainly scientists, university students, and workers in applied science. I doubt they care too much about a rigorous adherence to the "look and feel" advocated by Apple. If buttons, comboboxes, etc., work pretty much as expected, that is probably fine. They do like stuff to show up properly in task bars, etc., though, and are mostly not command line geeks. A fine line I guess.
Title: Re: When will Cocoa be stable?
Post by: Akira1364 on April 07, 2019, 06:04:39 pm
Should Cocoa also be set to "working" on the roadmap? "In progress" makes it sound like it is still unusable.
Title: Re: When will Cocoa be stable?
Post by: jwdietrich on April 07, 2019, 06:35:43 pm
Should Cocoa also be set to "working" on the roadmap? "In progress" makes it sound like it is still unusable.

IMO we should have a special category "partially working" for development stages of this kind.
Title: Re: When will Cocoa be stable?
Post by: VTwin on April 10, 2019, 05:29:28 am
I agree that the Cocoa widgetset is very close to production ready. I am already using it as such, as Carbon is no longer a viable option for me. However, the Cocoa IDE is still lacking some fundamental capabilities. I have posted comments and bug reports.

I give my wholehearted and sincere thanks to the developers, primarily Dmitry as I understand it. A few things, however, still need to be fixed before the Carbon IDE can be finally left behind. I'm sure bounties or donations would be appreciated.
Title: Re: When will Cocoa be stable?
Post by: skalogryz on April 10, 2019, 07:09:05 am
as a note. I've a side project happening right now. so I've minimal time for Cocoa.
The project started last October. Obviously the same time as Cocoa updates stopped.
Title: Re: When will Cocoa be stable?
Post by: dbannon on April 10, 2019, 07:53:45 am
IMO we should have a special category "partially working" for development stages of this kind.

Maybe "Functional except for...." type of statement ?   There is no doubt Lazarus on Mac made a heap of progress recently (thanks Dmitry and martin_fr) , but not perfect. But capable of supporting many project right now. We could say same about Lazarus on other platforms, nothing is ever perfect.

For example, I'm bugged by the SystemTray Icon component. It was, at one time 'perfect' on Linux, but recent Gnome based releases of Linux (eg Fedora 28 and 29) no longer support it. So, we could also say the same "Functional except for..." on Linux too. As long as people are informed of the limitations they can plan accordingly. Better than telling people "not yet", "come back later" .....

Davo
Title: Re: When will Cocoa be stable?
Post by: VTwin on April 10, 2019, 03:25:36 pm
as a note. I've a side project happening right now. so I've minimal time for Cocoa.
The project started last October. Obviously the same time as Cocoa updates stopped.

I wondered if that might be the case. Many thanks for your excellent work on Cocoa. Best of luck with your project!
Title: Re: When will Cocoa be stable?
Post by: VTwin on April 10, 2019, 03:49:52 pm
Maybe "Functional except for...." type of statement ?   There is no doubt Lazarus on Mac made a heap of progress recently (thanks Dmitry and martin_fr) , but not perfect. But capable of supporting many project right now. We could say same about Lazarus on other platforms, nothing is ever perfect.

Fine by me, I run into a few Cocoa interface glitches, like some strange behavior with ShowModal and PopupMenu (I have not isolated it yet), but the Carbon widgets also had some odd behavior.

I have been using the Cocoa IDE successfully for some time, but there are still a few (reported) issues which new users would likely find difficult to accept. I'd say that where it is now (2.0.0 fixes) probably a new user should use the Carbon IDE and compile for Cocoa. I'm hoping that will change by 2.0.2, but that may be coming too quickly. Perhaps 2.0.2 could be released with that in mind?
Title: Re: When will Cocoa be stable?
Post by: AlexTP on April 18, 2019, 09:40:33 am
I made to Dmitry 2 donations, he a) fixed painting of selected item in ColorListbox, b) added painting of circle mark for RadioItems.
Title: Re: When will Cocoa be stable?
Post by: Hansaplast on April 18, 2019, 11:08:36 am
Awesome!  :)
Title: Re: When will Cocoa be stable?
Post by: VTwin on April 19, 2019, 02:01:19 am
Dmitry fixed the TUpDown control as well. His Patreon blog explains the process. I signed up as a patron to show my support for his past and continued work.
Title: Re: When will Cocoa be stable?
Post by: Wallaby on April 25, 2019, 05:20:37 am
I have been recently paying Dmitry directly for fixing outstanding Cococa bugs.

Good work so far and it should eventually result in a stable widgetset.
Title: Re: When will Cocoa be stable?
Post by: VTwin on April 25, 2019, 09:15:24 pm
I have been recently paying Dmitry directly for fixing outstanding Cococa bugs.

Good work so far and it should eventually result in a stable widgetset.

That is great, I'd love to see him able to test on Mojave. :)

Just a thought, but I'd love to see the Cocoa fixes merged into the 2.0 fixes branch. At the moment it looks like they are only going into trunk. Releasing software compiled on trunk might not be a good idea, but I assume 2.0 fixes is stable.
Title: Re: When will Cocoa be stable?
Post by: Hansaplast on May 06, 2019, 10:38:50 am
Since I have been tinkering more with Cocoa, the question;
What will the minimal macOS version/SDK Lazarus will support?
Or is there a mechanism to "choose" what SDK to use.


The reason why I ask, is that I tried to use a few functions that require more recent header translations.
Example; NSOperatingSystemVersion (https://developer.apple.com/documentation/foundation/nsoperatingsystemversion?language=objc)
This requires 10.10+ SDK, and returns an array of 3 integers with the macOS version (seems to be hidden in 10.9 as well).


Having said that;
I'm just an amateur developer, so by far an expert on things.
I did however do a few conversions that I've gotten to work.
For example some Apple stuff DiskArbitration, etc. and the headers for libarchive (https://www.libarchive.org/).


I'm not sure if anyone would be interested, and I'm pretty sure there are a few things I may or may not have done entirely right - I'm ready to learn .  :D
Title: Re: When will Cocoa be stable?
Post by: Frank on May 17, 2019, 12:02:36 pm
Unfortunately, the Cocoa widgetset isn't an official project (https://foundation.freepascal.org/projects) of the Foundation.

Just a question from an un-informed, why is this so?

Apple has clearly marked 32bit apps (Carbon) as on their way out and that leaves 64bit (Cocoa)...

But Lazarus widget set Cocoa is not "official"?
Title: Re: When will Cocoa be stable?
Post by: skalogryz on May 17, 2019, 04:21:45 pm
Cocoa is pretty much Lazarus official widgetset.

Patreon support is not though. It's my personal patreon page.
Title: Re: When will Cocoa be stable?
Post by: esvignolo on May 17, 2019, 06:16:50 pm
Great job and thank you! I suscribe in your patreon.
Title: Re: When will Cocoa be stable?
Post by: skalogryz on May 21, 2019, 02:24:49 am
Thank you, kind sir!
Title: Re: When will Cocoa be stable?
Post by: Dan3468298 on June 11, 2019, 04:32:04 pm
I have set up a recurring donation to skalogryz to induce Cocoa completion.
Title: Re: When will Cocoa be stable?
Post by: VTwin on June 11, 2019, 04:39:29 pm
svn 61355 is causing an access violation under Cocoa, I reverted to 61353.
Title: Re: When will Cocoa be stable?
Post by: skalogryz on June 11, 2019, 05:33:45 pm
is there a backtrace available? nevermind

upd: 61356 fixes the AV
Title: Re: When will Cocoa be stable?
Post by: VTwin on June 11, 2019, 06:21:48 pm
is there a backtrace available? nevermind

upd: 61356 fixes the AV

Excellent, thanks! I just updated to 61357, it is working fine.
Title: Re: When will Cocoa be stable?
Post by: trev on June 12, 2019, 03:28:47 am
Just subscribed to skalogryz's patreon fund to help speed Cocoa widget set development.
Title: Re: When will Cocoa be stable?
Post by: VTwin on June 20, 2019, 01:57:56 am
Just subscribed to skalogryz's patreon fund to help speed Cocoa widget set development.

Excellent. There have been many new updates to Cocoa, and it is rapidly evolving to be an excellent and stable widgetset. There are still many shortcomings that show up in the IDE, but my compiled code seems very stable and reported bugs have been fixed quickly.
Title: Re: When will Cocoa be stable?
Post by: MobileDevGuy on July 26, 2019, 10:04:40 pm
Cocoa is pretty much Lazarus official widgetset.

Patreon support is not though. It's my personal patreon page.

Just joined as a Patreon support (Mike M).  Keep up the good work.  I may even try to help out.  My background is delphi VCL but i've also done a lot of objC work
Title: Re: When will Cocoa be stable?
Post by: skalogryz on July 26, 2019, 10:06:57 pm
thank you, sir
Title: Re: When will Cocoa be stable?
Post by: Dan3468298 on October 12, 2019, 06:27:43 pm
Is there timeline for Printer support?   That's a requirement for me as I move towards implementing my project.

Title: Re: When will Cocoa be stable?
Post by: silvestre on October 12, 2019, 06:54:40 pm
Perhaps a deference and financial support to the author of the work, so that you benefit later is a good idea. To give and to receive; this is only my personal opinion. ;)

Is there timeline for Printer support?   That's requirement for me as I move towards implementing my project.
Title: Re: When will Cocoa be stable?
Post by: Dan3468298 on October 12, 2019, 07:26:41 pm
Perhaps a deference and financial support to the author of the work, so that you benefit later is a good idea. To give and to receive; this is only my personal opinion. ;)

Is there timeline for Printer support?   That's requirement for me as I move towards implementing my project.

Have been donating for 3 months. 
Title: Re: When will Cocoa be stable?
Post by: dbannon on October 13, 2019, 10:54:52 am
Er, I believe printing under Cocoa is working. I just printed a page to confirm that. From memory it was just one of those things that went through just before 2.0.4.

But I use Fixes_2 so thats all I can confirm its working on.

Davo
Title: Re: When will Cocoa be stable?
Post by: Dan3468298 on October 13, 2019, 06:59:28 pm
Er, I believe printing under Cocoa is working. I just printed a page to confirm that. From memory it was just one of those things that went through just before 2.0.4.

But I use Fixes_2 so thats all I can confirm its working on.

Davo

The roadmap for Cocoa needs to be updated then.  Will try Fixes_2 this week.  Thanks.
TinyPortal © 2005-2018