Re: "nw_endpoint_handler_set_adaptive…" coming from XPC service

2021-05-27 Thread Jens Alfke via Cocoa-dev
> On May 27, 2021, at 11:17 AM, Dragan Milić via Cocoa-dev > wrote: > > I’ve got an application, which uses (a couple of) XPC service(s) to > accomplish various tasks. Since recently, I don’t know when exactly but > probably after some macOS update, I started seeing these messages coming

Re: MacOS: nonmodal NSAlert panel

2021-05-12 Thread Jens Alfke via Cocoa-dev
> On May 12, 2021, at 11:17 AM, Carl Hoefs via Cocoa-dev > wrote: > > I had thought it was possible on MacOS to run an NSAlert panel nonmodally… Alerts are modal by definition, per the HIG (IIRC). If you want a non-modal panel, it wouldn't be an alert; you'd have to implement it yourself

Re: How to parse a log file

2020-10-26 Thread Jens Alfke via Cocoa-dev
> On Oct 26, 2020, at 3:01 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > Is it possible to determine the exact line in the source code where the error > occurred? The "+ " thing in each stack line is the byte offset from the start of the function, in the machine code. Not super

Re: App store question regarding Big Sur

2020-09-20 Thread Jens Alfke via Cocoa-dev
> On Sep 20, 2020, at 11:35 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > when I upload a new version of my app that runs under Big Sur, > which version will the Catalina users get? AFAIK there is just one version of your app on the store at a time. You have to make it compatible with all

Re: NSSecureCoding & Nested Collections & macOS 11

2020-09-03 Thread Jens Alfke via Cocoa-dev
That sounds like a framework bug, since the warning is telling you to use the method you're already using. I'd file a bug report with Apple. —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Anyone using CloudKit?

2020-09-01 Thread Jens Alfke via Cocoa-dev
Hey, is anyone here using CloudKit? I'm getting started with it and have issues. There's some content on Apple's dev forums, but frankly even the new improved forums have awful UX (why couldn't they have simply used Discourse?) #1: My Apple developer account is not the same as my regular Apple

Re: AddInstanceForFactory: No factory registered for id

2020-08-19 Thread Jens Alfke via Cocoa-dev
> On Aug 19, 2020, at 8:27 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > I would just like for the (error?) message in the log file to go away. Don't worry about it. There are plenty of Apple subsystems that log warnings in normal operation. It would be nice if it didn't happen, but it's

Re: AddInstanceForFactory: No factory registered for id

2020-08-18 Thread Jens Alfke via Cocoa-dev
> On Aug 18, 2020, at 3:18 PM, Carl Hoefs > wrote: > > Run a test using the system .aif sound files: they won't work. > Convert them to .mp3 files: they do work. > That's what I mean by "in my experience". If NSSound won't play the system sound files, something is really messed up. Can you

Re: AddInstanceForFactory: No factory registered for id

2020-08-18 Thread Jens Alfke via Cocoa-dev
> On Aug 18, 2020, at 11:10 AM, Carl Hoefs via Cocoa-dev > wrote: > > In my experience, playing sounds (in macOS apps) only works when using mp3 > files. I disagree. NSSound supports all the formats CoreAudio does, and normally for brief sounds people use AIFF. I can't imagine any feature

Re: Relieving memory pressure

2020-06-07 Thread Jens Alfke via Cocoa-dev
> On Jun 7, 2020, at 3:27 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > For large images, this "thumbnail" can well occupy 1 GB of RAM. That seems excessive. Shouldn’t you shrink it down to the actual screen resolution first? > My current approach is to calculate the amount of unused

Re: Finding memory leaks

2020-05-20 Thread Jens Alfke via Cocoa-dev
> On May 20, 2020, at 7:03 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > This line is in a method I declared like that: > > - (void) loadNextImageWithIndex: (unsigned long) next_index image: > (CGImageRef *) next_image > withProps: (CFDictionaryRef *) next_props

Re: Concurrent loading of images ?

2020-05-10 Thread Jens Alfke via Cocoa-dev
> On May 8, 2020, at 2:53 PM, Gabriel Zachmann wrote: > > But in my case, I really have just one task, so the queue would - at most - > contain one task at a time. You have to consider the case where the user is flipping through images faster than you can load them. In that case you do get

Re: Concurrent loading of images ?

2020-05-08 Thread Jens Alfke via Cocoa-dev
> On May 8, 2020, at 9:53 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > So, I was thinking, maybe it helps to load the next image concurrently, while > the current one is still being displayed. Sure. Just be aware that if you're using NSImage, simply loading an NSImage does not rasterize

Re: Creating OpenSSH compatible key pairs

2020-04-11 Thread Jens Alfke via Cocoa-dev
The Sec* APIs are a world of pain. Of anything I’ve ever programmed in, um, 42 years, they are the ones that have gotten me closest to throwing my computer through a window in a rage. (Runner-up: CoreAudio.) They’re very vague and poorly documented, and their capabilities and behaviors vary

Re: Thunderbolt port audio programmability

2020-03-21 Thread Jens Alfke via Cocoa-dev
> On Mar 20, 2020, at 8:00 PM, Carl Hoefs > wrote: > > when the AU subsystem renders this data, it ignores the offset and generates > a "corrected" X-axis-centered audio signal anyway Interesting ... I guess there’s filtering or normalization going on at some stage (in software or in the

Re: Thunderbolt port audio programmability

2020-03-17 Thread Jens Alfke via Cocoa-dev
If you want to make more than sine waves, there are a bunch of open source audio libraries/programs for generating arbitrarily fancy waveforms — CSound, Pure Data, Max, Supercollider... These are usually used for music synthesis, but most of them let you do general purpose DSP type stuff. And

Re: Thunderbolt port audio programmability

2020-03-13 Thread Jens Alfke via Cocoa-dev
> On Mar 12, 2020, at 5:31 PM, Carl Hoefs > wrote: > > In iOS, what is the current way to generate precise audio tones? > AVFoundation? CoreAudio? AudioUnits? AudioUnits. It's been a long time since I worked with that API, but I'm pretty sure I recall some sample code showing a generator

Re: Thunderbolt port audio programmability

2020-03-12 Thread Jens Alfke via Cocoa-dev
> On Mar 12, 2020, at 10:27 AM, Carl Hoefs via Cocoa-dev > wrote: > > I'm looking at creating an iPhone/iPad app that acts as a dual-channel > waveform generator. > > I see two options for the output signal medium: > (a) using the audio jack (on suitable devices), or > (b) using the

Re: Handling of paths through sandbox

2020-02-12 Thread Jens Alfke via Cocoa-dev
> On Feb 12, 2020, at 8:56 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > The problem is that the path names can get very long. > And I am going to show them to the user. There is support in AppKit for displaying file paths to the user. Unfortunately it's been long enough since I used it

Re: Sorting an array

2020-02-11 Thread Jens Alfke via Cocoa-dev
> On Feb 11, 2020, at 4:59 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > First of all, what are the advantages/disadvantages of either method? Sort descriptors are data; selectors are [references to] code. So a sort descriptor lets you configure the sorting without having to write any

Re: Is it necessary to suspend/resume a dispatch queue/source on sleep/wake notifications?

2020-02-06 Thread Jens Alfke via Cocoa-dev
> On Feb 6, 2020, at 9:16 AM, Matt DeFoor via Cocoa-dev > wrote: > > Does anyone know if it is necessary to dispatch_suspend/resume a queue or > source when sleep/wake notifications triggered in a macOS app? I can’t imagine why you’d need to. When the computer goes to sleep, the CPU stops,

Re: How to check whether directory tree has changed?

2019-12-21 Thread Jens Alfke via Cocoa-dev
> On Dec 21, 2019, at 10:18 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > Right. I was hoping there is an easy way to do this. > Something like a recursive check sum over the whole directory tree that the > OS might keep. > I don't want to do a complete tree traversal every time the app

Re: NSWorkspace notifications related to time change

2019-12-18 Thread Jens Alfke via Cocoa-dev
> On Dec 18, 2019, at 11:10 AM, Carl Hoefs via Cocoa-dev > wrote: > > Thanks for the suggestion. Apple docs have [[[NSWorkspace sharedWorkspace] > notificationCenter] in their code snippets. The docs for that property say that it's only for use with the notifications declared in

Re: Permission Denied trying to connect to localhost in unit test

2019-12-12 Thread Jens Alfke via Cocoa-dev
> On Dec 12, 2019, at 7:42 AM, Robert Walsh via Cocoa-dev > wrote: > > I am writing a command line application in Objective-C that needs to make a > TCP connection to a server. In a unit test for the TcpClient class I am > writing, I have a simple TCP server that listens for connections in

Re: Future of Cocoa

2019-11-21 Thread Jens Alfke via Cocoa-dev
> On Nov 21, 2019, at 2:43 PM, Pascal Bourguignon via Cocoa-dev > wrote: > > Why couldn’t we have application developed once for a few users, and working > consistently over long periods, on a stable platform? Stable platforms don't make money. (Except maybe in the enterprise market where

Re: Future of Cocoa

2019-11-21 Thread Jens Alfke via Cocoa-dev
> On Nov 21, 2019, at 12:20 PM, Pier Bover via Cocoa-dev > wrote: > > If someone can afford days/weeks to do watch WWDC sessions consistently > every year it's great. That's not a luxury all of us can afford and it's > ridiculous to think this should be a requirement. All you need to watch

Re: Future of Cocoa

2019-11-20 Thread Jens Alfke via Cocoa-dev
> On Nov 20, 2019, at 5:21 PM, Saagar Jha wrote: > > Oh, I guess I didn’t explain what I was talking about well. I’m saying that > the compiler would do a full method inline but put it behind a check to see > if it’s legal to continue executing. That optimization would increase code size

Re: Future of Cocoa

2019-11-20 Thread Jens Alfke via Cocoa-dev
> On Nov 20, 2019, at 2:46 PM, Saagar Jha wrote: > > I am curious why this optimization went in instead of guarded speculative > inlining, which would let you keep dynamism. If I understand it correctly, that only 'inlines' (really caches) the resolved method address for the call site.

Re: Future of Cocoa

2019-11-20 Thread Jens Alfke via Cocoa-dev
> On Nov 20, 2019, at 2:16 PM, Jean-Daniel via Cocoa-dev > wrote: > > If Obj-C is dead, why is Apple still adding new language extensions (and not > minor one) ? > > https://github.com/llvm/llvm-project/commit/d4e1ba3fa9dfec2613bdcc7db0b58dea490c56b1 > >

Re: Future of Cocoa

2019-11-20 Thread Jens Alfke via Cocoa-dev
> On Nov 20, 2019, at 8:28 AM, Pier Bover via Cocoa-dev > wrote: > > For example the vast majority of audio software > companies are still communicating to its users to not update to Catalina. > Huge audio companies like Native Instruments are still struggling with this. That's misleading.

Re: Future of Cocoa

2019-11-19 Thread Jens Alfke via Cocoa-dev
> On Nov 19, 2019, at 12:51 PM, Richard Charles via Cocoa-dev > wrote: > > If I understand it correctly, there is a linkage between Swift and > Objective-C. Apple devised a way to call the Cocoa frameworks written in > Objective-C from the Swift language using the magic of the LLVM

Re: List search

2019-11-18 Thread Jens Alfke via Cocoa-dev
> On Nov 15, 2019, at 6:07 AM, Turtle Creek Software > wrote: > > I think this list should migrate there. We don't have any control over this list or any of the others on lists.apple.com . They're run by Apple, and I think they've either forgotten about the

Re: other developer lists

2019-11-14 Thread Jens Alfke via Cocoa-dev
>>> Maybe another list for meta or post-mortem discussions could be created ? I manage the apple-dev.groups.io site, which hosts a number of Apple developer lists including a Cocoa one. I'd be happy to create a list for these kinds of discussions, if we can come

Re: Thoughts on Objective-C++

2019-11-13 Thread Jens Alfke via Cocoa-dev
> On Nov 13, 2019, at 10:58 AM, Richard Charles via Cocoa-dev > wrote: > > Over the last 16 years would bet that a lot of spit and polish has gone into > integrating Cocoa with Windows by the iTunes team. They only integrated the iTunes app with Windows. Getting a single app working does

Re: Thoughts on Objective-C++

2019-11-11 Thread Jens Alfke via Cocoa-dev
> On Nov 11, 2019, at 10:46 AM, Turtle Creek Software > wrote: > > That means no use of const. All pointers instead of & references. Both of > those are good at turning run-time errors into compile-time. […] No > public/private to manage access. Etc. It was like going back to the early

Re: Thoughts on Objective-C++

2019-11-11 Thread Jens Alfke via Cocoa-dev
> On Nov 11, 2019, at 9:28 AM, Pier Bover wrote: > > AFAIK no Apple frameworks for Swift have been (or will be) open sourced > either. Not higher-level ones, but the Swift standard libraries include the equivalent of most of Foundation. Which is a big deal, because the lack of an

Re: Thoughts on Objective-C++

2019-11-11 Thread Jens Alfke via Cocoa-dev
> On Nov 11, 2019, at 6:15 AM, Turtle Creek Software via Cocoa-dev > wrote: > > Then suggest that Cocoa would work better if Obj-C were a > superset of C++ rather than plain C. Objective-C++ all the way down, not > just in source files. Obj-C++ is a superset of C++, so I’m not sure what

Re: i386 Deprecated Warning in Xcode 9.4.1

2019-10-24 Thread Jens Alfke via Cocoa-dev
> On Oct 24, 2019, at 11:46 AM, Sandor Szatmari via Cocoa-dev > wrote: > > Is there a flag I can set in Xcode to squash these? If these are compiler (Clang) warnings, then: 1. Right-click on a warning in the Xcode issues browser 2. Select "Show In Log" — this should take you to the build

Re: Thoughts on productivity

2019-10-24 Thread Jens Alfke via Cocoa-dev
> On Oct 24, 2019, at 7:47 AM, Richard Charles via Cocoa-dev > wrote: > > Before September 2014 the developer documentation was excellent. Excellent > online documentation with downloadable and searchable pdfs. Now all pdfs are > gone and online documentation is like art on display in a

Re: Need for Swift

2019-10-15 Thread Jens Alfke via Cocoa-dev
> On Oct 15, 2019, at 10:52 AM, Turtle Creek Software > wrote: > > Diving down into C sounds like a reasonable option for a database library. > It does not sound good for a specialty app that does construction estimating > and accounting. I don't see the difference, for the purposes of

Re: Need for Swift

2019-10-15 Thread Jens Alfke via Cocoa-dev
> On Oct 15, 2019, at 9:40 AM, Richard Charles via Cocoa-dev > wrote: > > 2. Another option is Swift but it has zero integration with C++. So this is > really not a choice at all. Swift integrates with C. So you can declare C APIs to your C++ codebase, and call those from Swift. This does

Re: Need for Swift

2019-10-15 Thread Jens Alfke via Cocoa-dev
> On Oct 15, 2019, at 6:59 AM, Turtle Creek Software via Cocoa-dev > wrote: > > TurtleSoft has a big investment in C++ source code that's full of > construction business logic. Unfortunately, with the death of Carbon its > future value is in doubt. I know I’ve brought up Objective-C++ to you

Re: Need for Swift

2019-10-14 Thread Jens Alfke via Cocoa-dev
> On Oct 14, 2019, at 5:02 PM, Charles Srstka wrote: > > Swift, on the other hand, can actually *be* a scripting language if you want > it to; put #!/usr/bin/env swift at the top of a source file, give it execute > permissions, and voilà, it’ll run just like a script. *Anything* can be a

Re: Need for Swift

2019-10-14 Thread Jens Alfke via Cocoa-dev
> On Oct 14, 2019, at 11:25 AM, Carl Hoefs via Cocoa-dev > wrote: > > I see Computer Science students here falling into two groups. The group that > likes Swift generally likes scripting languages, Python, and the like. Whoa, I completely disagree. Objective-C is much, much closer to

Re: Thoughts on Cocoa

2019-10-12 Thread Jens Alfke via Cocoa-dev
—Jens > On Oct 11, 2019, at 3:32 PM, tblenko--- via Cocoa-dev > wrote: > > I attended a public (technical) talk in Town Hall (I think it’s called) at > Apple shortly before or after I went to work there. It would have been around > 2000-2001. > > The speaker’s message was that the future

Re: Need for Swift

2019-10-11 Thread Jens Alfke via Cocoa-dev
> On Oct 11, 2019, at 8:10 PM, Kirk Kerekes via Cocoa-dev > wrote: > > I further infer that the perceived need arose due to the confluence of > aggravation over publicity over security bugs and the desire to develop > autonomous vehicle software. I don’t think so. Language people don’t

Re: Thoughts on Cocoa source code

2019-10-11 Thread Jens Alfke via Cocoa-dev
> On Oct 11, 2019, at 12:22 PM, Richard Charles wrote: > > A second choice "Cross-platform Cocoa App" would be great for the small > developer who’s focus is on business applications. All whole world doesn’t > revolve around games. https://developer.apple.com/xcode/swiftui/

Re: Thoughts on Cocoa source code

2019-10-11 Thread Jens Alfke via Cocoa-dev
> On Oct 11, 2019, at 6:18 AM, Turtle Creek Software via Cocoa-dev > wrote: > > Our time is best > spent solving business-related problems. Along the way we have learned > many programming and human-interface skills, but the less time we need to > spend on that, the better. Totally

Re: How to compile for macOS 10.11 ?

2019-10-11 Thread Jens Alfke via Cocoa-dev
> On Oct 11, 2019, at 1:36 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > But a customer tells me that it does not work under El Capitan on their > machine. > It displays the message "This screen saver requires OS X 10.14". If the alert is that specific, it sounds like your bundle has an

Re: Thoughts on Cocoa

2019-10-10 Thread Jens Alfke via Cocoa-dev
> On Oct 10, 2019, at 6:18 PM, Richard Charles via Cocoa-dev > wrote: > > Just a guess but perhaps management had an awakening when they found the time > and effort expended to write the next even better version of Finder in Carbon > was substantially more difficult and costly that the prior

Re: Thoughts on Cocoa source code

2019-10-09 Thread Jens Alfke via Cocoa-dev
> On Oct 9, 2019, at 11:39 AM, Aandi Inston wrote: > > * But for whatever reason, I'm using the Mac OS 10.14 SDK. So that will get a > compile-time warning. Only if you don't turn on -Werror, which I really, really recommend everyone do. Calling a method that a class isn't declared as

Re: Thoughts on Cocoa source code

2019-10-09 Thread Jens Alfke via Cocoa-dev
> On Oct 9, 2019, at 10:19 AM, Turtle Creek Software via Cocoa-dev > wrote: > > Why is Cocoa source code hidden? So, take this as opinions of someone who worked at Apple, on [among other things] Mac OS X apps from 2000-2007. (a) It's part of Apple's crown jewels and seen as a competitive

Re: iOS play microphone to headphones

2019-10-08 Thread Jens Alfke via Cocoa-dev
> On Oct 8, 2019, at 10:06 AM, Alex Zavatone wrote: > > Doesn’t the user have to select the output device? No, that's just the default. If you use audio APIs you can choose to direct output to any connected device. —Jens ___ Cocoa-dev mailing

Re: iOS play microphone to headphones

2019-10-07 Thread Jens Alfke via Cocoa-dev
> On Oct 6, 2019, at 1:07 PM, Eric Dolecki via Cocoa-dev > wrote: > > Quick Swift question. Is it fairly easy to take audio and play it to > headphones (not a recording) and be able to turn the microphone on/off? I’m > not interested in doing any analysis, just turning outside audio on/off.

Re: Thoughts on Cocoa

2019-10-04 Thread Jens Alfke via Cocoa-dev
> On Oct 4, 2019, at 12:41 PM, Lars C. Hassing via Cocoa-dev > wrote: > > "Apple is committed to the HIViews, Carbon events, and nib files for Carbon > implementations of the user interface. >All new controls and other features will be based on HIView. >If you want your application

Re: Thoughts on Cocoa

2019-10-03 Thread Jens Alfke via Cocoa-dev
> On Oct 2, 2019, at 10:14 AM, Turtle Creek Software via Cocoa-dev > wrote: > > For > anyone smaller, it's hard to justify the constant need to rewrite code just > to stay in the same place. Return on investment is just not there. Seems > like each new update is more difficult. The people I

Re: Thoughts on ARC

2019-10-02 Thread Jens Alfke via Cocoa-dev
—Jens > On Oct 1, 2019, at 2:50 PM, Sam Ryan wrote: > > In fact those applications are forced upon the user in a way that I've never > seen before, as if they are core system components. You mean pre-installed? There have always been plenty of bundled apps like Mail, Calendar, Chess, etc.

Re: Thoughts on ARC

2019-09-30 Thread Jens Alfke via Cocoa-dev
> On Sep 30, 2019, at 4:57 PM, Sam Ryan wrote: > > I tried a completely new approach - Electron. I have found Electron to be > surprisingly quick to prototype, easy to bridge to c++, and is cross platform > (non mobile at least). I would not have recommended a non-native approach > until

Re: Thoughts on ARC

2019-09-30 Thread Jens Alfke via Cocoa-dev
> On Sep 30, 2019, at 8:16 AM, Robert Walsh via Cocoa-dev > wrote: > > however, to use it to do anything other than building a desktop or IOS GUI > application seems to result in code with messy syntax and what seem to me to > be hacks in order to bridge between NS* and CG* code. (Lots of

Re: Thoughts on ARC

2019-09-27 Thread Jens Alfke via Cocoa-dev
> On Sep 27, 2019, at 9:20 AM, Richard Charles via Cocoa-dev > wrote: > > What I wish Apple would do is release a cross platform Objective-C (and > Swift) solution. ... > The Mac vs Windows war is over and long gone so why doesn’t Apple help out > the small developer and release a cross

Re: Xcode 11 can't make an objective-C subclass any more?

2019-09-23 Thread Jens Alfke via Cocoa-dev
> On Sep 23, 2019, at 2:19 PM, James Walker via Cocoa-dev > wrote: > > Am I losing my mind, or is there no longer a good way to create a new > Objective-C subclass? If I go to create a new Objective-C file, I am offered > the file type options: Empty File, Category, Protocol, Extension.

Re: Why is / a metachar in regular expressions ?

2019-09-18 Thread Jens Alfke via Cocoa-dev
> On Sep 18, 2019, at 1:45 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > I don't see why / is a meta character. > It does not appear anywhere else in the documentation as metacharacter. In some languages "/" is used as the delimiter to begin/end a regular expression, for example in sed

Re: 10.15 command line tools headers missing

2019-09-13 Thread Jens Alfke via Cocoa-dev
> On Sep 13, 2019, at 1:32 AM, Mark Allan via Cocoa-dev > wrote: > > I was initially reluctant to post this here because of NDA concerns No worries, there hasn't been a F*cking NDA for years now. You can talk about beta Xcode builds in public. > They've pulled the same trick again with

Re: boundingRectWithSize gives wrong size

2019-09-10 Thread Jens Alfke via Cocoa-dev
> On Sep 10, 2019, at 9:54 AM, Gabriel Zachmann wrote: > > The excess width is sometimes more, sometimes a bit less, I could not find a > pattern. > I guess , it has something to do with the actual glyphs in the string. How much bigger is it? By a fraction of a character width? Or is it more

Re: boundingRectWithSize gives wrong size

2019-08-28 Thread Jens Alfke via Cocoa-dev
> On Aug 28, 2019, at 12:33 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > NSRect string_rect = CGRectIntegral( [mesg_string boundingRectWithSize: > drawRect_.size What is drawRect_ set to when this is called? It's been a while since I used this, but IIRC the output width will be the

Re: Cocoa-dev Digest, Vol 16, Issue 72

2019-08-28 Thread Jens Alfke via Cocoa-dev
> On Aug 27, 2019, at 7:21 PM, Turtle Creek Software > wrote: > > What I can't find is where the __bridge cast should go. The compiler > complains at all locations. > The app runs the same, but will ARC be OK without it? You shouldn't need to use __bridge at all, since you're no longer

Re: Cocoa-dev Digest, Vol 16, Issue 72

2019-08-27 Thread Jens Alfke via Cocoa-dev
> On Aug 27, 2019, at 12:35 PM, Turtle Creek Software > wrote: > > We are happy with the lifetime management in our C++ classes. You're having mysterious ref-counting bugs, so the fact that you're storing Obj-C references as void* sets off alarm bells. > And C++ keeps improving. ARC

Re: Cocoa-dev Digest, Vol 16, Issue 72

2019-08-27 Thread Jens Alfke via Cocoa-dev
> On Aug 26, 2019, at 6:22 PM, Turtle Creek Software > wrote: > > There are links between each Cocoa control class and its matching C++ control > (which also owns a native MFC control). > Also links between the view and our C++ controller, to load window layouts > and set up the control

Re: Recommendations for cross platform library/framework

2019-08-27 Thread Jens Alfke via Cocoa-dev
> On Aug 26, 2019, at 4:41 PM, Pier Bover via Cocoa-dev > wrote: > > I'd prefer avoiding C++ if possible. I had a similar dilemma in 2015 but went with C++, despite earlier bad experiences with it. I've been happy with my choice; C++11 improved the language quite a lot and C++17 even

Re: Cocoa-dev Digest, Vol 16, Issue 72

2019-08-26 Thread Jens Alfke via Cocoa-dev
> On Aug 26, 2019, at 1:15 PM, Turtle Creek Software > wrote: > > 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. I can understand the model and some of the controller logic

Re: Cocoa-dev Digest, Vol 16, Issue 72

2019-08-26 Thread Jens Alfke via Cocoa-dev
> On Aug 25, 2019, at 5:49 PM, Turtle Creek Software via Cocoa-dev > 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,

Re: ARC

2019-08-25 Thread Jens Alfke via Cocoa-dev
> On Aug 24, 2019, at 4:46 AM, Turtle Creek Software > wrote: > > Our app delegate class is not deallocated. The window controller is > deallocated > despite the member reference there. That should not be possible. Could you paste the exact line of code that declares the window-controller

Re: ARC

2019-08-23 Thread Jens Alfke via Cocoa-dev
> On Aug 23, 2019, at 2:17 PM, Casey McDermott via Cocoa-dev > wrote: > > After we finished, the controller for our main window started being > deallocated some random time after launch. > Apparently the erroneous strong references were keeping it alive. AppKit delegates, like

Re: Is the list alive?

2019-05-29 Thread Jens Alfke via Cocoa-dev
> On May 29, 2019, at 7:22 AM, Richard Charles via Cocoa-dev > wrote: > > Internally at Apple I would bet that most developers get their questions > answered by asking another developer. Back when I worked at Apple (1998-2007) there were internal mailing lists much like these — I learned a