Re: Cocoa-dev Digest, Vol 16, Issue 72
Re: Cocoa-dev Digest, Vol 16, Issue 72
- Subject: Re: Cocoa-dev Digest, Vol 16, Issue 72
- From: Turtle Creek Software via Cocoa-dev <email@hidden>
- Date: Mon, 26 Aug 2019 16:15:36 -0400
Our C++ is cross-platform. More importantly, we have a LOT of accounting
and business logic in C++.
To rewrite and test it would be 5 or 10 programmer-years.
We never found any way to have Obj-C members in C++ header files, except as
void *.
Also, no way to reference Obj-C headers from C++. It's easy to go from
Cocoa to C++.
Going back needs a linker class, with a C++ header and Obj-C++ in the
source.
That wasn't too bad to set up. More than half of the past 3 yrs has been
spent dealing with
NSTableView, NSTabView and NSOutlineView.
Casey McDermott
TurtleSoft.com
On Mon, Aug 26, 2019 at 2:47 PM Jens Alfke <email@hidden> wrote:
>
>
> On Aug 25, 2019, at 5:49 PM, Turtle Creek Software via Cocoa-dev <
> email@hidden> wrote:
>
> No use of NSBridgingRetain or Release at all. Is that necessary under ARC?
>
>
> Those functions are only for casting CoreFoundation types to/from Obj-C.
>
> The void pointers are mostly to text fields and controls, plus the app
> delegate
> and one view. None of those have had lifetime problems. We mostly just
> access them and have them do one thing.
>
>
> Unless your C++ code is cross-platform, it's better to use Obj-C types in
> it instead of casting them to void*. (Change the source file suffix to
> ".mm" if you haven't already.) Then ARC will manage them properly.
>
> —Jens
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden