ARC

2019-08-23 Thread Casey McDermott via Cocoa-dev
f the scope. What is best practice to hold a strong reference on it until the app closes? BTW, one site we looked at describes ARC as "kind of like a Japanese B-horror movie". That seems accurate. Casey McDermott TurtleSoft.com ___ Cocoa-d

Re: Is the list alive? (Leo)

2019-05-29 Thread Casey McDermott via Cocoa-dev
ck Overflow has hits for any problem, but many answers are old (and wrong). It's even worse for Obj-C, since new answers are mostly Swift. Not much sweet spot in between. When other options fail, sometimes folks on this list have already been there, and provide invaluable help. Thanks to

Re: Crashing in NSTabView

2019-05-22 Thread Casey McDermott
et up properly. I'm not quite sure how that threw off reference counting, but it stopped crashing after adding a branch in didSelectTabViewItem to bypass the first call. Thanks for all the suggestions! Casey McDermott Turtle Creek Software ___

Re: Crashing in NSTabView

2019-05-22 Thread Casey McDermott
With current ARC, it's not allowed to override retain, release, autorelease or retaincount. Too bad, because breakpoints there can really help when debugging lifetime issues. Worst case, I guess we could go back to an earlier Xcode that allows them. But that won't be fun. Casey

Re: Crashing in NSTabView

2019-05-22 Thread Casey McDermott
n go there. dealloc is too late to be useful. Casey McDermott Turtle Creek Software On Wednesday, May 22, 2019, 1:23:57 PM EDT, Matt Jacobson wrote: On May 22, 2019, at 1:19 PM, Casey McDermott wrote: The Allocations feature in Instruments looks promising. Is there a way to limit the

Re: Crashing in NSTabView

2019-05-22 Thread Casey McDermott
old Xcode versions where everything is different. We are mostly C++ folks, where this kind of problem is easily solved with a breakpoint in the destructor. Thanks, Casey McDermott Turtle Creek Software On Wednesday, May 22, 2019, 11:43:30 AM EDT, Keary Suska wrote: When you say

Crashing in NSTabView

2019-05-22 Thread Casey McDermott
dding a separate, strong reference to each tab view controller.  It still crashes, but it takes a few more tab switches before the controller is released. Any suggestions for what might be causing this? Casey McDermott Turtle Creek Software ___ Coco

Re: Re: NSTabViewItem and NSViewController

2019-04-04 Thread Casey McDermott
her ad hoc, maybe to fix this very problem. The official way to set the property is on init via tabViewItemWithViewController. Unfortunately, we allocate the view controller from inside the NSTabViewItem so that will require a serious rewrite. I think we will try NSTabViewController first.

Re: NSTabViewItem and NSViewController

2019-04-04 Thread Casey McDermott
but a breakpoint at dealloc doesn't help much. However, we were not using a NSTabViewController. We'll try that now. Thanks, Casey McDermott Turtle Creek Software On Thu, 4/4/19, Keary Suska wrote: Subject: Re: NSTabViewItem and NSViewControl

NSTabViewItem and NSViewController

2019-04-04 Thread Casey McDermott
s the likeliest culprit? NSTabViewItem is not a NSView subclass. Does that prevent it from managing lifetime for a view and view controller? Thanks, Casey McDermott Turtle Creek Software ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please d

viewDidLoad is OK, IOReturn isn't

2018-11-28 Thread Casey McDermott
machine and Xcode 10.1. There are fixes on Stack Overflow but for older versions. Looks like the frameworks have changed since then. Thanks, Casey McDermott TurtleSoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

viewDidLoad

2018-11-28 Thread Casey McDermott
uot; Apples online docs don't say anything about it being deprecated. Is it no longer OK to call it? It's still in the header file. NSViewController is the primary suspect for the crashing problems we experience after the move. Th

Diagnosing memory problems

2018-11-27 Thread Casey McDermott
just shows performDelayedCleanup and then main. No clues to what's wrong. Is there lore or are there tools for tracking object lifetimes in Obj-C/ARC? Anything that changed in 10.13 that might be biting us? Thanks, Casey McDermott TurtleSof

Re: NSDrawer

2018-10-02 Thread Casey McDermott
>> One potential problem I see with drawers is - if the window was in full >> screen mode, nothing appears to happen unless they know to get out of full >> screen (which isn’t a good experience). In our case, the data entry screens have a fixed-size layout, so the window is also a fixed size. N

Re: C++ pointer to Cocoa object

2018-09-08 Thread Casey McDermott
LView, which deletes the C++ controls. Thanks, Casey McDermott www.TurtleSoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-adm

Re: C++ pointer to Cocoa object

2018-09-07 Thread Casey McDermott
over, and I didn't commit when it was breaking. But if it happens again I'll do more in-depth testing on it. Thanks, Casey McDermott www.TurtleSoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

C++ pointer to Cocoa object

2018-09-07 Thread Casey McDermott
xcess bits in a 64-bit address to store class info. Is there some other way to test for an invalid void pointer? Thanks, Casey McDermott TurtleSoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: Carbon -> Cocoa

2018-08-20 Thread Casey McDermott
ttps://stackoverflow.com/questions/35229149/interacting-with-c-classes-from-swift I didn't find any mention of future support being planned. Casey McDermott Turtle Creek Software ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do no

Re: Carbon -> Cocoa

2018-08-17 Thread Casey McDermott
ll it last? Seems like the future is an entirely Swift-based API that replaces Objective-C Cocoa in 5 years, with no easy way to link to other languages. The payback isn't big enough to write software with only a 5 year lifetime. Casey McDermott Turtle

Re: Carbon -> Cocoa

2018-08-17 Thread Casey McDermott
e than Mac sales would justify, so it would be time to go Windows-only or just fold. Casey McDermott Turtle Creek Software On Thu, 8/16/18, Sean McBride wrote: Subject: Re: Carbon -> Cocoa To: "Casey McDermott" , cocoa-dev@lists.apple.com

Re: Carbon -> Cocoa

2018-08-17 Thread Casey McDermott
2 years ago. Completion estimates keep receding. Casey McDermott Turtle Creek Software ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-de

Carbon -> Cocoa

2018-08-16 Thread Casey McDermott
I am curious, are there other developers on this list working on conversions from C++ Carbon to Cocoa? If so, how is it going? Thanks, Casey McDermott Turtle Creek Software ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: NSComboBox

2018-07-25 Thread Casey McDermott
better for that, but not when in hands-on-keyboard mode. NSComboBox is so close. That one sentence in the docs is so tantalizing! Thanks, Casey McDermott Turtle Creek Software http://www.turtlesoft.com 607 220-4514 On Wed, 7/25/18, Quincey Morris

Re: NSComboBox

2018-07-25 Thread Casey McDermott
need, and it would be nice if both platforms looked the same. One big beef I have is that it's not possible to step into Cocoa source, unlike PowerPlant or MFC. It makes it much harder to understand what's going on inside Cocoa. Thanks, Casey McDermott Turtle Creek Soft

Re: NSComboBox

2018-07-25 Thread Casey McDermott
ld" article by Tog may be on one of the developer CDs. I can't find it online. It explained this use case very well, and interface to solve it. It was a major reason why we switched from Excel templates to a C++ app. NSComboBox is close, but we need it confined to existing items. Tha

NSComboBox

2018-07-25 Thread Casey McDermott
ng field". I'm surprised NSComboBox doesn't just have a Boolean to do what we want. Thanks, Casey McDermott Turtle Creek Software http://www.turtlesoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: NSDrawer

2018-07-18 Thread Casey McDermott
>>  FWIW, the deprecation warning for NSDrawer says to "consider using  >>NSSplitViewController." I can see how NSSplitViewController might be a good replacement in some cases, but not here. Thanks for all the suggestions, Casey McDerm

Re: NSDrawer

2018-07-14 Thread Casey McDermott
, and better suited for a single window with outline & tabs. Thanks, Casey McDermott http://www.turtlesoft.com On Fri, 7/13/18, Uli Kusterer wrote: Subject: Re: NSDrawer To: "Casey McDermott" Cc: cocoa-dev@lists.apple.com Date: Fri

Re: NSDrawer

2018-07-03 Thread Casey McDermott
it is just right for this one task. Thanks, Casey McDermott www.TurtleSoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists

NSDrawer

2018-07-02 Thread Casey McDermott
drawer? Any idea when deprecation turns into total non-support? Thanks, Casey McDermott www.TurtleSoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mode

Re: Exception handling

2018-06-16 Thread Casey McDermott
BTW, raising an NSException inside a C++ try{} catch(...){} block also seems to work OK. It does get caught. Casey McDermott On Sat, 6/16/18, Alastair Houghton wrote: Subject: Re: Exception handling To: "Jens Alfke" Cc: "

Re: Exception handling

2018-06-14 Thread Casey McDermott
ll the help, Casey McDermott On Thu, 6/14/18, Alastair Houghton wrote: Subject: Re: Exception handling To: "Jens Alfke" Cc: "Casey McDermott" , "cocoa-dev list" Date: Thursday, June 14, 2018, 1:11 PM On 14 Jun

Exception handling

2018-06-13 Thread Casey McDermott
scape to. Is there a way to override the event loop in Cocoa? Some other way we can escape to the event loop and then continue from there? Thanks, Casey McDermott ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: Re: Icon radio buttons

2018-01-24 Thread Casey McDermott
Thanks for all the helpful replies. Was this list on hiatus for a month? We sent the question Dec 22 and it was just posted yesterday. Fortunately, it was not hard to "roll our own". Probably would have needed that anyhow because the buttons respond differently to double-click. Thanks, Casey

Icon radio buttons

2018-01-23 Thread Casey McDermott
Is there a way to have a palette of icon buttons act like radio buttons, without use of the deprecated NSMatrix? The goal is something like the drawing tool palette in the Sketch sample app (or ancient MacDraw). In IB, it is not possible to add an image to a NSButton with style radio. It automati