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 out

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 us

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 useful

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 co

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 I

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 n

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 memor

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 Off-t

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 m

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 grea

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 DAC

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 of

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 AU

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 Thund

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 th

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 cust

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, so

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 la

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 NSWorkspace

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 ar

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 (i

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. That

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. Na

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 compiler.

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 listserv

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 up

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 no

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 open-source

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 you’r

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 log

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 muse

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 thi

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 m

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 h

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 scr

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 scripti

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 deve

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/ https://developer

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 reasonabl

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 In

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 implem

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 ad

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 list

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 rec

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 c

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 plat

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. No

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 whe

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 10.1

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 sam

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 casti

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 doesn

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 li

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 furthe

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 bei

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, plu

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 r

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 NSWindow.deleg

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

Re: Cannot include Carbon on Mojave

2019-05-16 Thread Jens Alfke
> On May 15, 2019, at 8:07 AM, Glenn L. Austin wrote: > > Actually, the screw ups are on those software developers who write their code > based upon SDK behavior, not documentation. Yes, Apple sometimes makes > mistakes, but more often the "mistake" is that Apple fixed a bug (isn't that > wha

Re: Cannot include Carbon on Mojave

2019-05-14 Thread Jens Alfke
> On May 14, 2019, at 2:40 PM, Vojtěch Meluzín > wrote: > > Hey folks, that's to you all. It's all the missing 32-bit support now... > Need to revert to XCode 9, forever... The audio community just needs and > will need 32-bit support, no matter what Apple thinks. Well, I’m in the audio comm

Re: xCode troubles

2019-05-14 Thread Jens Alfke
> On May 14, 2019, at 3:39 AM, Peter Hudson wrote: > > xCode has just decided ( for the 20th time this week ) that I don’t deserve > any UI tools in Interface Builder - as in the panel on the right hand side of > the main window. I have tried everything I can think of to try to get them > b

Re: Category errata in Objective-C

2019-03-29 Thread Jens Alfke
> On Mar 29, 2019, at 2:51 PM, Alex Zavatone wrote: > > Also, I seem to remember the esteemed Jens stating that as soon as a category > class is in your project, it applies to all objects instantiated from the > base class and we only had to do an import if we wanted to use the category > me

Re: My eyes are failing me.

2019-02-22 Thread Jens Alfke
> On Feb 22, 2019, at 1:07 PM, Alex Zavatone wrote: > > It should not show the /api in the description of the URL if it is not going > to use it in any call using that URL. The .baseURL property returns the original URL with the /api path. > It’s outright misleading and there is nothing in

Re: My eyes are failing me.

2019-02-22 Thread Jens Alfke
> On Feb 22, 2019, at 9:40 AM, Alex Zavatone wrote: > > The description is non standard and misleading and the /api string is > stripped from the URL that it indicates it will use in that URL. You gave it an absolute path, “/login”. This has exactly the same meaning as an absolute filesyste

Re: My eyes are failing me.

2019-02-22 Thread Jens Alfke
> On Feb 22, 2019, at 8:39 AM, Alex Zavatone wrote: > > self.loginURL = [NSURL URLWithString:@"/login" > relativeToURL:self.sharedData.webServicesURL]; // // WHY does this not work? > It does "/login -- https://qa-home.mrcooper.com/api > " Because NSURL’s .

Re: Silly question on extending NSObject.

2019-02-21 Thread Jens Alfke
> On Feb 20, 2019, at 5:11 PM, Alex Zavatone wrote: > > Commenting out #import “NSObject+AutoDescribe.h” in the .pch does cause an > invalid selector build error if autoDescribe is used in any class file, but > you can enter it on an object from the debugger. The warning/error is just becaus

Re: Silly question on extending NSObject.

2019-02-19 Thread Jens Alfke
> On Feb 19, 2019, at 1:23 PM, Alex Zavatone wrote: > > In most Objective-C projects I add an autodescribe category on NSObject and > put the import for the category header into a .pch for the project so that it > will be available for every class in the project. > This lets me dump an object

Re: Questions regarding the sandbox in iOS

2019-02-06 Thread Jens Alfke
> On Feb 5, 2019, at 6:13 PM, Carl Hoefs wrote: > > Of NSHomeDirectory, NSDocumentDirectory, and NSLibraryDirectory, I'm > currently using NSDocumentLibrary for the scratch directory. I presume for > each of these areas, the storage is persistent across app invocations. Is > there a temporar

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Jens Alfke
> On Feb 5, 2019, at 9:25 AM, Carl Hoefs wrote: > > The reason for the specific sandbox questions is that my iOS app needs to > call 3rd-party functions, some of which create temp files "in place" - as if > they did an fopen("filename.ext","w"). Such temp files appear to be written > "nowher

Re: NSImage to JPEG file?

2019-01-16 Thread Jens Alfke
> On Jan 16, 2019, at 9:59 AM, Carl Hoefs > wrote: > > But all of that would come "for free" if NSImage inherited from NSData, no? Well, that wouldn’t make sense, because an NSImage isn’t a piece of data. It can have multiple data representations (JPEG, PNG, PDF…) and it might not have any

Re: NSImage to JPEG file?

2019-01-16 Thread Jens Alfke
> On Jan 16, 2019, at 8:32 AM, Carl Hoefs > wrote: > > It was the NSData tie-in I didn't know. (I was expecting NSImage to have > innate export capabilities That would be poor API design. If it had -writeToFile, then it would also need -writeToStream:, -writeToFileHandle:, -writeToFileDescr

Re: NSImage to JPEG file?

2019-01-15 Thread Jens Alfke
It’s been a long time since I worked with NSImages, but it’s easy to get a JPEG representation using just plain AppKit. Just look through the representations for an NSBitmapImageRep, then call [rep representationUsingType: NSBitmapImageFileTypeJPEG options: 0]. —Jens PS: _Please_ don’t reply

Re: Why would a view be asked to draw after its window has been ordered out?

2018-12-13 Thread Jens Alfke
> On Dec 13, 2018, at 1:26 PM, James Walker wrote: > > The view was using a C++ object that had been destroyed during closing of my > document. I'm afraid that if I start playing with the order of destruction, > I'm likely to break something else. An NSDocument won’t be dealloced until al

Re: Custom NSButton image effects for pressed/disabled

2018-12-12 Thread Jens Alfke
> On Dec 11, 2018, at 5:03 PM, Lars C. Hassing wrote: > > If I assign an image to an NSButton it is displayed with nice pressed and > disabled effects. > > In my custom NSButton, that should display image1+title+image2, I override > drawRect:, but how do I obtain the EXACT SAME system effect

Re: Sharing Files Between My Apps via iCloud

2018-10-26 Thread Jens Alfke
> On Oct 26, 2018, at 3:43 AM, Uli Kusterer > wrote: > > Many apps make that assumption about Dropbox as well, and it is dangerous. Yup. Case in point is the support forums for Scrivener (an excellent word processor for book-writing, which uses a bundle file format), where there are numero

Re: C++ pointer to Cocoa object

2018-09-07 Thread Jens Alfke
> On Sep 7, 2018, at 10:46 AM, Casey McDermott wrote: > > Problem is, with ARC turned on, the pointer is never nil, so it crashes. > The void pointer somehow becomes an NSAtom instead of 0. Something wrote to that pointer, then. If you initialize it to nullptr, it will stay that way. NSAtom

Re: Carbon -> Cocoa

2018-08-22 Thread Jens Alfke
> On Aug 22, 2018, at 10:40 AM, Alastair Houghton > wrote: > > Well, yes and no. If the network library works that way, it’ll fire its > callbacks on the background thread, which makes life awkward if you’re > interacting with the UI Then you write glue around the callbacks that dispatches

Re: Carbon -> Cocoa

2018-08-22 Thread Jens Alfke
> On Aug 21, 2018, at 8:33 AM, Alastair Houghton > wrote: > > So, for instance, it’s not so good on macOS or iOS if its event dispatcher is > based on select(), (e)poll() or kqueue() because what you really want on > macOS/iOS is for the event dispatch to go via CFRunLoop; if it doesn’t, >

Re: Carbon -> Cocoa

2018-08-20 Thread Jens Alfke
> On Aug 18, 2018, at 11:19 AM, Stephane Sudre wrote: > > It might be the new Carbon once: > > - there is ABI stability in Swift. This could be not before late 2019. > > - the new APIs are only available in Swift. Is Swift NIO a hint this > is coming sooner than expected? By “NIO” do you me

Re: Carbon -> Cocoa

2018-08-20 Thread Jens Alfke
> On Aug 20, 2018, at 12:43 AM, Alastair Houghton > wrote: > > I’d tentatively suggest that it’s likely that Swift will develop some means > of interfacing more directly with C++ code in the future, which should make > this easier rather than harder. There are tools like SWIG for generating

Re: Carbon -> Cocoa

2018-08-17 Thread Jens Alfke
> On Aug 17, 2018, at 9:45 AM, Casey McDermott wrote: > > It's annoying but not dreadful to link C++ code into Cocoa via Objective-C. > Throw in Swift and future APIs > that are Swift-dominated, and it becomes harder. How soon will it be > impossible? Never. I can't think of a single (nont

Re: Archiving a project

2018-08-06 Thread Jens Alfke
> On Aug 5, 2018, at 4:49 PM, Saagar Jha wrote: > > There used to be an Xcode mailing list, but it was shut down a while back. I > assume most of the usual traffic to that list has thoroughly dispersed > throughout the rest of the lists on this site, as well as help groups > elsewhere on the

Re: NSComboBox

2018-07-25 Thread Jens Alfke
> On Jul 25, 2018, at 10:45 AM, Casey McDermott wrote: > > The goal is to auto-fill an account from what they type, and ignore typing if > not a match. That sounds like the regular behavior of NSPopUpButton: after clicking to pop up the menu, you can type-select items from it. (Although it

Re: Lazy calculation of tooltip text

2018-07-06 Thread Jens Alfke
> On Jul 6, 2018, at 8:22 AM, Jonathan Taylor > wrote: > > Any suggestions on how I might supply tooltip text dynamically, when the > tooltip is about to display? @protocol NSViewToolTipOwner - (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userDat

  1   2   3   4   5   6   7   8   9   10   >