Re: Cocoa framework or Object class to uncompress files

2022-10-25 Thread Carl Hoefs via Cocoa-dev
On Oct 25, 2022, at 12:12 AM, Markus Spoettl wrote: > > On 10/25/22 3:45 AM, Carl Hoefs via Cocoa-dev wrote: >> My iOS app downloads a gzip'd data file into its sandbox that the app needs >> to unzip >> and process. I don't see anything in Cocoa (such as NSFileMan

Cocoa framework or Object class to uncompress files

2022-10-24 Thread Carl Hoefs via Cocoa-dev
My iOS app downloads a gzip'd data file into its sandbox that the app needs to unzip and process. I don't see anything in Cocoa (such as NSFileManager) that addresses uncompressing files. Is there a way? (BTW, I tried some ancient 3rd party code called ZipArchive but it always fails trying to

Re: UIActivityIndicatorView to send an action

2022-10-14 Thread Carl Hoefs via Cocoa-dev
> > Richard > > >> On Oct 14, 2022, at 1:37 PM, Carl Hoefs via Cocoa-dev >> wrote: >> >> The idea just occurred to me to place a clear UIButton atop the spinner and >> have that send the action. That will work but just seems kinda hacky... >> >>&g

Re: UIActivityIndicatorView to send an action

2022-10-14 Thread Carl Hoefs via Cocoa-dev
The idea just occurred to me to place a clear UIButton atop the spinner and have that send the action. That will work but just seems kinda hacky... > On Oct 14, 2022, at 12:30 PM, Carl Hoefs via Cocoa-dev > wrote: > > Got an iPhone app enhancement request today to be able to tap

UIActivityIndicatorView to send an action

2022-10-14 Thread Carl Hoefs via Cocoa-dev
Got an iPhone app enhancement request today to be able to tap the spinning activity indicator (UIActivityIndicatorView) to pop up some info on the status of the busy activity. UIActivityIndicatorView isn't like a UIButton which has sent actions, so is there a way to do this? -Carl

Re: Cocoa framework for GPU utilization

2022-09-24 Thread Carl Hoefs via Cocoa-dev
:54 AM, Richard Charles wrote: > > Just a heads up. Metal does not support the double data type. > > Richard > > >> On Sep 22, 2022, at 2:37 PM, Carl Hoefs via Cocoa-dev >> wrote: >> >> Yes, Metal seems to be the way to go with this... and i

Re: Cocoa framework for GPU utilization

2022-09-22 Thread Carl Hoefs via Cocoa-dev
r Polytechnic Institute > >> On Sep 21, 2022, at 4:42 PM, Carl Hoefs via Cocoa-dev >> mailto:cocoa-dev@lists.apple.com>> wrote: >> >> I just got a new M1 Max Mac Studio (10-core CPU / 32-core GPU / 16-core >> neural engine). How can I take advantage of

Cocoa framework for GPU utilization

2022-09-21 Thread Carl Hoefs via Cocoa-dev
I just got a new M1 Max Mac Studio (10-core CPU / 32-core GPU / 16-core neural engine). How can I take advantage of the GPUs and "neural" engine from Cocoa? Is there a Cocoa framework or other API to access these? In my case, I have a highly parallelizable Cocoa task that uses dispatch_apply()

Re: App can't be opened

2021-09-09 Thread Carl Hoefs via Cocoa-dev
On a 10.13 system, your app gives this in the console log: opendirectoryd: Authentication failed for with result ODErrorCredentialsInvalid opendirectoryd: ODRecordVerifyPassword failed with result ODErrorCredentialsInvalid The (extensive) crash log has this at the top: Crashed Thread:

MacOS: nonmodal NSAlert panel

2021-05-12 Thread Carl Hoefs via Cocoa-dev
I had thought it was possible on MacOS to run an NSAlert panel nonmodally... I'd like to present an informational alert for n seconds then dismiss it without user interaction. But I don't see any way to dismiss, terminate, cancel, invalidate, etc. an NSAlert object. I know this is possible in

Re: Cocoa dylib access by C program

2020-11-13 Thread Carl Hoefs via Cocoa-dev
uot;MyBridge.h" > > void RegularFunction() > { > DoObjectiveCStuff(); > } > > I hope that helps! > > ~Martin Wierschin > > >> On Nov 13, 2020, at 11:16 AM, Carl Hoefs via Cocoa-dev >> wrote: >> >> I have built an ObjC/Cocoa/Fou

Cocoa dylib access by C program

2020-11-13 Thread Carl Hoefs via Cocoa-dev
I have built an ObjC/Cocoa/Foundation library.dylib; it works well when linked with ObjC apps. But now I need to link a C program against that library. How do I invoke the ObjC library methods from a C program? (I know I can add C function entry points to the library, but how do they invoke

Re: Scaling a UIImage

2020-11-04 Thread Carl Hoefs via Cocoa-dev
gt; > Cheers, > Alex Zavatone > > >> On Nov 3, 2020, at 10:34 AM, James Crate via Cocoa-dev >> mailto:cocoa-dev@lists.apple.com>> wrote: >> >> On Nov 2, 2020, at 5:59 PM, Carl Hoefs via Cocoa-dev >> mailto:cocoa-dev@lists.apple.com>

Re: Scaling a UIImage

2020-11-02 Thread Carl Hoefs via Cocoa-dev
Okay. It was my understanding that -TIFFRepresentation was the only way to get serializable image data bytes... What is a more efficient way to do this? -Carl > On Nov 2, 2020, at 3:09 PM, David Duncan wrote: > > Also any code using -TIFFRepresentation for any reason other than to get >

Re: Scaling a UIImage

2020-11-02 Thread Carl Hoefs via Cocoa-dev
Yes! That's what I overlooked. "native" isn't what I intended. Thanks! -Carl > On Nov 2, 2020, at 3:09 PM, David Duncan wrote: > >> UIGraphicsBeginImageContextWithOptions(newSize, NO, 0.0); > > Explicitly pass 1 here. > > ___ Cocoa-dev

Scaling a UIImage

2020-11-02 Thread Carl Hoefs via Cocoa-dev
How can I correctly scale a UIImage from 3264x2448 down to 640x480 pixels? I have an iOS app that interacts with a macOS server process. The iOS app takes a 3264x2448 camera image, scales it to 640x480 pixels, and makes a JPEG representation of it to send to the server: NSData *dataObj =

Re: Rotating NSTextField 90 degrees

2020-09-24 Thread Carl Hoefs via Cocoa-dev
-nsbutton-nstextfield.html > > > >> On Sep 24, 2020, at 11:09 PM, Carl Hoefs via Cocoa-dev >> wrote: >> >> In my MacOS app I need to display some vertical text (normal text rotated 90 >> degrees counterclockwise). >> >> I don't

Rotating NSTextField 90 degrees

2020-09-24 Thread Carl Hoefs via Cocoa-dev
In my MacOS app I need to display some vertical text (normal text rotated 90 degrees counterclockwise). I don't see anything in NSTextField or Xcode IB that allows a change of orientation. Could NSAttributedString be used to do this, or is there some CoreGraphics way? -Carl

Re: Invalidating UIImageView's image cache

2020-09-23 Thread Carl Hoefs via Cocoa-dev
Yes! +[UIImage imageNamed:] was The Caching Culprit™️. I was barking up the wrong object (UIImageView). As per Eric's suggestion I've switch to +[UIImage imageWithContentsOfFile:], and now there's no image caching (as per Mike's suggestion to RTM: "This method does not cache the image

Re: Invalidating UIImageView's image cache

2020-09-22 Thread Carl Hoefs via Cocoa-dev
> On Sep 22, 2020, at 1:46 PM, Eric Lee via Cocoa-dev > wrote: > >> I don't have a good answer, but I think this may be more that UIImage caches >> the images, not UIImageView. Maybe you can find something in UIImage's >> docs/headers? > > I think you may be on to something. This WWDC >

Invalidating UIImageView's image cache

2020-09-01 Thread Carl Hoefs via Cocoa-dev
Q: What is the proper way to invalidate UIImageView's image cache? - - - I have an iPad app that generates a series of medical analysis UIImages in the ~/Documents area of the sandbox. I then display those images in an automated sequence on the GUI. Each time the app runs through its

Re: AddInstanceForFactory: No factory registered for id

2020-08-18 Thread Carl Hoefs via Cocoa-dev
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". Mark > On Aug 18, 2020, at 1:56 PM, Jens Alfke wrote: > > > >> On Aug 18, 2020, at 11:10 AM, Carl Hoefs via Co

Re: AddInstanceForFactory: No factory registered for id

2020-08-18 Thread Carl Hoefs via Cocoa-dev
> On Aug 18, 2020, at 10:33 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > (I have already experimented with AudioServicesCreateSystemSoundID(), but > failed.) In my experience, playing sounds (in macOS apps) only works when using mp3 files. -Carl

Re: Drag-and-drop onto an NSTextField?

2020-08-01 Thread Carl Hoefs via Cocoa-dev
I was wondering also about the necessity of: [self setNeedsDisplay:YES]; It seems to work fine without it (perhaps it's already being done by the superclass, NSTextField?). -Carl > On Aug 1, 2020, at 5:28 AM, Graham Cox wrote: > > You shouldn’t call -becomeFirstResponder yourself. >

Re: Drag-and-drop onto an NSTextField?

2020-07-31 Thread Carl Hoefs via Cocoa-dev
gt;>> wrote: >>> >>> For NSTexrField I have always created a subclass for my textfields >>> >>> I call -registerForDraggedTypes: in -awakeFromNib in the subclass >>> >>> And then to accept the drag implement the method in the sublclass >>&g

Drag-and-drop onto an NSTextField?

2020-07-31 Thread Carl Hoefs via Cocoa-dev
Why is drag-and-drop onto an NSTextField enabled only when it has focus? Is there any way around this? -Carl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: Points vs pixels in a bash script

2020-06-08 Thread Carl Hoefs via Cocoa-dev
Note that your AppleScript returns the size of ALL monitors combined. With four 1920x1080 monitors in a 2x2 arrangement it shows: 0, 0, 3840, 2160 -Carl > On Jun 8, 2020, at 3:44 PM, Marco S Hyman via Cocoa-dev > wrote: > > Using >> system_profiler SPDisplaysDataType >> I can retrieve

Re: How to save a window's position and size

2020-05-25 Thread Carl Hoefs via Cocoa-dev
You could try setting your self.masterViewController.view as self.window's initial first responder. (But I get the feeling you're "fighting the Frameworks" here...) -Carl > On May 25, 2020, at 11:48 AM, Gabriel Zachmann wrote: > > Thanks a lot for the response. >> >> [self.window

Re: How to save a window's position and size

2020-05-25 Thread Carl Hoefs via Cocoa-dev
Something like this would work (in -applicationWillFinishLaunching:): [self.window setFrame:[[NSScreen mainScreen] frame] display:YES]; -Carl > On May 24, 2020, at 3:09 PM, Gabriel Zachmann wrote: > > Alternatively, is there a way to start it such that it always starts in > fullscreen,

Re: How to save a window's position and size

2020-05-23 Thread Carl Hoefs via Cocoa-dev
No guarantees, but you could try moving your code into an AppDelegate method that gets invoked earlier: - (void)applicationWillFinishLaunching:(NSNotification *)notification; -Carl > On May 23, 2020, at 12:53 PM, Gabriel Zachmann wrote: > > Actually, after observing the new behavior for a

Re: How to save a window's position and size

2020-05-22 Thread Carl Hoefs via Cocoa-dev
The referenced documentation code (©2009) appears to be a wee bit outdated... Try supplying your own NSString for the auto save name, as [window representedFilename] no longer seems to return a valid NSWindowFrameAutosaveName. In AppDelegate.m I have this and it works: -

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
Cosmic rays? Disk corruption? Tired bits? Embedded escapes? Xcode cruft? Whatever the bug-a-boo was, with a freshly reinstalled Xcode (11.2.1) and command line tools, it's gone! I blew everything away and rebuilt the project and It Just Works™️. Thanks for all the support. Sorry for the

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
When everything goes wonky... it's time to reinstall all of Xcode...! *sigh* -Carl ___ 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

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
8 >> 2020 >> 2020-04-29 16:14:09.253715-0500 Timer[83275:13268128] Wed Apr 29 16:14:09 >> 2020 >> 2020-04-29 16:14:10.254741-0500 Timer[83275:13268128] Wed Apr 29 16:14:10 >> 2020 >> >> I’ll mail you the project offlist. >> >> &

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
mer[83275:13268128] Wed Apr 29 16:14:08 2020 > 2020-04-29 16:14:09.253715-0500 Timer[83275:13268128] Wed Apr 29 16:14:09 2020 > 2020-04-29 16:14:10.254741-0500 Timer[83275:13268128] Wed Apr 29 16:14:10 2020 > > I’ll mail you the project offlist. > > > >> On Apr 29, 202

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
On Apr 29, 2020, at 1:53 PM, Carl Hoefs via Cocoa-dev wrote: > > On Apr 29, 2020, at 1:43 PM, Steve Mills via Cocoa-dev > mailto:cocoa-dev@lists.apple.com>> wrote: >> >> On Apr 29, 2020, at 15:36:23, Carl Hoefs via Cocoa-dev >> wrote: >>> >>

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
On Apr 29, 2020, at 1:43 PM, Steve Mills via Cocoa-dev wrote: > > On Apr 29, 2020, at 15:36:23, Carl Hoefs via Cocoa-dev > wrote: >> >> When I issue NSTimer's +timerWithTimeInterval: method, I'm getting >> unexpected timer firing times (20X faster than expec

NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
When I issue NSTimer's +timerWithTimeInterval: method, I'm getting unexpected timer firing times (20X faster than expected). ∙ If I specify 1.0 for the time interval, my method gets called 20 times/sec. ∙ If I specify 20.0 for the time interval, my method gets called 1 time/sec. ∙ If I

Re: Thunderbolt port audio programmability

2020-03-20 Thread Carl Hoefs via Cocoa-dev
Thanks for all the helpful insights and links. At this point, I'm using Audio Units in my iOS test app. I can generate signals of specific type, frequency and amplitude. That was the easy part... However, a hard requirement is that the app must generate what amounts to 'DC-offset' signals

Re: Thunderbolt port audio programmability

2020-03-12 Thread Carl Hoefs via Cocoa-dev
> On Mar 12, 2020, at 11:13 AM, Jens Alfke wrote: > > >> On Mar 12, 2020, at 10:27 AM, Carl Hoefs via Cocoa-dev >> mailto:cocoa-dev@lists.apple.com>> wrote: >> >> I'm looking at creating an iPhone/iPad app that acts as a dual-channel >>

Thunderbolt port audio programmability

2020-03-12 Thread Carl Hoefs via Cocoa-dev
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 Thunderbolt port Q: Is there a Cocoa framework for programming the Thunderbolt port?

Re: NSWorkspace notifications related to time change

2019-12-18 Thread Carl Hoefs via Cocoa-dev
On Dec 18, 2019, at 12:39 PM, Jean-Daniel wrote: > >> Le 18 déc. 2019 à 20:10, Carl Hoefs via Cocoa-dev > <mailto:cocoa-dev@lists.apple.com>> a écrit : >> >>> On Dec 18, 2019, at 11:35 AM, James Walker via Cocoa-dev >>> mailto:cocoa-dev@lists.ap

Re: NSWorkspace notifications related to time change

2019-12-18 Thread Carl Hoefs via Cocoa-dev
On Dec 18, 2019, at 12:31 PM, Jean-Daniel via Cocoa-dev wrote: > > >> Le 18 déc. 2019 à 18:25, Steve Mills via Cocoa-dev >> a écrit : >> >>> On Dec 18, 2019, at 11:19, Carl Hoefs via Cocoa-dev >>> wrote: >>> >>> I have

Re: NSWorkspace notifications related to time change

2019-12-18 Thread Carl Hoefs via Cocoa-dev
> On Dec 18, 2019, at 11:35 AM, James Walker via Cocoa-dev > wrote: > > On 12/18/19 9:55 AM, Carl Hoefs via Cocoa-dev wrote: > >> However, I cannot get this notification to fire on system time changes. My >> other notifications (such as sleep w

Re: NSWorkspace notifications related to time change

2019-12-18 Thread Carl Hoefs via Cocoa-dev
> On Dec 18, 2019, at 10:25 AM, Steve Mills via Cocoa-dev > wrote: > >> On Dec 18, 2019, at 11:19, Carl Hoefs via Cocoa-dev >> wrote: >> >> I have a macOS daemon that uses NSTimers for scheduling user event >> reminders. >> >> Th

NSWorkspace notifications related to time change

2019-12-18 Thread Carl Hoefs via Cocoa-dev
I have a macOS daemon that uses NSTimers for scheduling user event reminders. This works well except for abrupt time changes: (1) the user explicitly changes the date/time (2) the user crosses into a different time zone (3) daylight saving time comes/goes. Then I need to recalculate the

Re: UIView block-based methods

2019-11-11 Thread Carl Hoefs via Cocoa-dev
On Nov 11, 2019, at 9:46 AM, David Duncan wrote: > >> On Nov 9, 2019, at 12:09 PM, Carl Hoefs via Cocoa-dev >> wrote: >> >> I'm trying to keep some older iOS code going, but I'm getting a deprecation >> warning on many UIView class methods

UIView block-based methods

2019-11-09 Thread Carl Hoefs via Cocoa-dev
I'm trying to keep some older iOS code going, but I'm getting a deprecation warning on many UIView class methods: +beginAnimations:context: +setAnimationBeginsFromCurrentState: +setAnimationDuration: +commitAnimations etc. Xcode 11.2.1 says: "'beginAnimations:context:' is deprecated: first

Re: Need for Swift

2019-10-14 Thread Carl Hoefs via Cocoa-dev
> On Oct 12, 2019, at 9:24 AM, Charles Srstka via Cocoa-dev > wrote: > >> On Oct 12, 2019, at 10:55 AM, Pier Bover via Cocoa-dev >> wrote: >> >> Yeah I think Apple saw Obj-C as a barrier for developer adoption. I don't >> think that's too far from the truth considering the emphasis on

Re: Thoughts on Cocoa

2019-10-02 Thread Carl Hoefs via Cocoa-dev
> On Oct 2, 2019, at 10:43 AM, Richard Charles via Cocoa-dev > wrote: > > >> On Oct 2, 2019, at 11:14 AM, Turtle Creek Software via Cocoa-dev >> wrote: >> >> Sadly, we just decided to abandon the Cocoa update for our app. > > Great historical overview from a small developers

Re: Displaying an "album of images" in iOS

2019-09-19 Thread Carl Hoefs via Cocoa-dev
Turns out there's an iCarousel framework that provides Cover Flow functionality. https://github.com/nicklockwood/iCarousel <https://github.com/nicklockwood/iCarousel> Thanks to all! -Carl > On Sep 19, 2019, at 4:48 PM, Carl Hoefs via Cocoa-dev > wrote: > &

Re: Displaying an "album of images" in iOS

2019-09-19 Thread Carl Hoefs via Cocoa-dev
Yes! Coverflow! That was the name of it! Thanks for the pointer. -Carl > On Sep 19, 2019, at 4:45 PM, Steve Mills via Cocoa-dev > wrote: > >> On Sep 19, 2019, at 18:22, Carl Hoefs via Cocoa-dev >> wrote: >> >> I'm writing an iPhone app that analyzes

Displaying an "album of images" in iOS

2019-09-19 Thread Carl Hoefs via Cocoa-dev
I'm writing an iPhone app that analyzes an input image and generates nine jpg images. That's too many to be displayed at once on the GUI, so I thought to use an "album of images" that the user can thumb through (an animated display that used to be popular years ago on Finder, Safari, iTunes,

Re: Screensaver icon ?

2019-09-17 Thread Carl Hoefs via Cocoa-dev
Ah, so is this the reason Quartz Composer compositions (*.qtz) won't run as screen savers in Mojave? -Carl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: NSLog displays inconsistent format for NSDate

2019-08-31 Thread Carl Hoefs via Cocoa-dev
> On Aug 31, 2019, at 2:51 AM, Allan Odgaard via Cocoa-dev > wrote: > > On 31 Aug 2019, at 2:49, Carl Hoefs via Cocoa-dev wrote: > >> Same result if I run it as a system daemon. So as you suggest it seems there >> could be some sort of environment sensitivity go

Re: NSLog displays inconsistent format for NSDate

2019-08-30 Thread Carl Hoefs via Cocoa-dev
> Cheers, > -- Uli Kusterer > "The Witnesses of TeachText are everywhere..." > http://www.zathras.de > >> On 20. Aug 2019, at 21:50, Carl Hoefs via Cocoa-dev >> wrote: >> >> When printing out an NSDate using NSLog from within Xcode I get: >>

NSLog displays inconsistent format for NSDate

2019-08-20 Thread Carl Hoefs via Cocoa-dev
When printing out an NSDate using NSLog from within Xcode I get: "Tue Aug 20 12:32:40 2019" When the same program is run from within a shell (bash) window: "2019-08-20 19:32:48 +" Is the NSDate output format somehow determined by the environment? My system is set to Local Time Zone

Re: Is the list alive?

2019-05-29 Thread Carl Hoefs via Cocoa-dev
> On May 29, 2019, at 6:02 AM, Steve Mills via Cocoa-dev > wrote: > > On May 28, 2019, at 19:46:26, Leo via Cocoa-dev > wrote: >> >> >> Hmm... my earlier message today never got through. > > Supposedly, these lists are to be done away with at some point. Someone > started