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

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 p

Re: UIActivityIndicatorView to send an action

2022-10-14 Thread Carl Hoefs via Cocoa-dev
ect? > > 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... >> >&

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
2022, at 7: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... a

Re: Cocoa framework for GPU utilization

2022-09-22 Thread Carl Hoefs via Cocoa-dev
er 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 o

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 i

Re: Cocoa dylib access by C program

2020-11-13 Thread Carl Hoefs via Cocoa-dev
include "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 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 th

Re: Scaling a UIImage

2020-11-04 Thread Carl Hoefs via Cocoa-dev
} > > > 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 > actua

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 mailing

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 = UII

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'

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
Ah maybe it is the use of `imageNamed:`. I believe that caches the image >> data in a system cache. Have you tried `imageWithContentsOfFile:`? >> >> https://developer.apple.com/documentation/uikit/uiimage/1624123-imagewithcontentsoffile >> >>> On Sep 22,

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 processin

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 Ho

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
Sandor, Ah! That's quite clever... and it works, too! Thanks! -Carl > On Jul 31, 2020, at 5:16 PM, Sandor Szatmari > wrote: > > Carl, > >> On Jul 31, 2020, at 20:07, Carl Hoefs wrote: >> >> Hmm, subleasing NSTextField doesn't work for me (th

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 mod

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 the

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 setFrame

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 wh

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: - (void)applicationDidFi

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
noise! -Carl p.s. - isn't this supposed to only happen on Fridays at 5:00pm? > On Apr 29, 2020, at 2:45 PM, Carl Hoefs > wrote: > > When everything goes wonky... it's time to reinstall all of Xcode...! > > *sigh* > -Carl > >

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 cocoa-dev-admins(

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
00 Timer[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

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

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 speci

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

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 >> wav

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? Ca

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. >> >> This wo

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 ti

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 cla

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 depre

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 teachi

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

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: > > Yes!

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 anal

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

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 moderat

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
s it? > > 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

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

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 co...@apple-de

Re: Crashing in NSTabView

2019-05-22 Thread Carl Hoefs
> On May 22, 2019, at 11:31 AM, Daniel DeCovnick wrote: > > You can always subclass, turn off ARC for that file, and override -release or > -autorelease to breakpoint in. How does one turn off ARC for a specific file? -Carl ___ Cocoa-dev mailing l

Re: Moving cells in a UITableView

2019-05-17 Thread Carl Hoefs
Is this a bug, or is it documented behavior? Without the following setting: self.tableView.autoresizingMask |= UIViewAutoresizingFlexibleWidth; a UITableView won't permit reordering of the table's cells. -Carl > On May 16, 2019, at 8:38 PM, Carl Hoefs > wrote: >

Re: Moving cells in a UITableView

2019-05-16 Thread Carl Hoefs
The problem boils down to this: If a UITableView doesn't have inner-width autoresizing enabled, the table won't get the 'move row' ability. Q: How can I set this property on the UITableView programmatically? -Carl > On May 16, 2019, at 2:29 PM, Carl Hoefs > wrote:

Moving cells in a UITableView

2019-05-16 Thread Carl Hoefs
iOS 12.2 I want to allow the user of my iPhone app to finger-reorder the rows in a UITableView. I set tableView.editing=YES, and I receive 2 callbacks for each row in the table: (1) -tableView:editingStyleForRowAtIndexPath: --> return UITableViewCellEditingStyleNone. (2) -tableView:canMoveRow

Re: Setting the tag of an NSCell

2019-03-16 Thread Carl Hoefs
Subclassing worked perfectly! Thanks Rob! -Carl > On Mar 16, 2019, at 6:08 PM, Rob Petrovec wrote: > > If you want to use tags, you should subclass NSImageCell and implement -tag & > -setTag: to return your own ivar. Hope that helps. > ___ Cocoa

Re: Setting the tag of an NSCell

2019-03-16 Thread Carl Hoefs
xception. Subclasses are expected to override this > property if they support tags > > If you want to use tags, you should subclass NSImageCell and implement -tag & > -setTag: to return your own ivar. Hope that helps. > > —Rob > > >> On Mar 16, 2019, at 7:03 P

Setting the tag of an NSCell

2019-03-16 Thread Carl Hoefs
macOS 10.12, ObjC Is it not possible to set the tag of an NSImageCell at runtime? At runtime when I do "myCell.tag = val;" I get a warning: Stub implementation of -setTag by NSCell does nothing. I have an array of 48 NSImageCells. I can't hard-code them in Xcode because don't know the tag

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Carl Hoefs
invocations. Is there a temporary area available for use? -Carl > > Regards, > Saagar Jha > >> On Feb 4, 2019, at 19:30, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> iOS 12 >> >> Q1. In general, is an iOS app expecte

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Carl Hoefs
> On Feb 5, 2019, at 10:30 AM, Jens Alfke wrote: > >> On Feb 5, 2019, at 9:25 AM, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> The reason for the specific sandbox questions is that my iOS app needs to >> call 3rd-party func

Re: Questions regarding the sandbox in iOS

2019-02-05 Thread Carl Hoefs
her > shared folders like Music and so on. > > NSString *appLibraryFolder = > [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, > YES) objectAtIndex:0]; > NSString *appDocumentsFolder = > [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomai

Questions regarding the sandbox in iOS

2019-02-04 Thread Carl Hoefs
iOS 12 Q1. In general, is an iOS app expected to determine the sandbox path to manage its files? Q2. Does the sandbox behave like the "current working directory" default on macOS? (i.e., if a function writes out a file to just "filename" with no path, does it get written automatically to the

Re: NSImage to JPEG file?

2019-01-16 Thread Carl Hoefs
> On Jan 16, 2019, at 10:43 AM, Jens Alfke wrote: > >> On Jan 16, 2019, at 8:32 AM, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> It was the NSData tie-in I didn't know. (I was expecting NSImage to have >> innate export capa

Re: NSImage to JPEG file?

2019-01-16 Thread Carl Hoefs
Thanks Wim and Gerd. It was the NSData tie-in I didn't know. (I was expecting NSImage to have innate export capabilities, but this works too.) -Carl > On Jan 16, 2019, at 7:56 AM, Wim Lewis wrote: > > On Tue, Jan 15, 2019 at 08:10:58PM -0700, Carl Hoefs wrote: >> Using

Re: NSImage to JPEG file?

2019-01-15 Thread Carl Hoefs
Using NSBitmapImageRep, is it possible to write the JPEG representation out to a .JPG file on disk? -Carl > On Jan 15, 2019, at 4:01 PM, Jens Alfke wrote: > > 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 l

UIImagePickerController and 48-bit photos

2019-01-15 Thread Carl Hoefs
I've been tasked with scoping out creating an iPhone app that processes "48-bit" images or photos on the newer iPhones. (I unfortunately don't have a "newer" iPhone yet to try this out.) Questions: - Does the UIImagePickerController paradigm work transparently for such images, as it does for n

Re: NSImage to JPEG file?

2019-01-14 Thread Carl Hoefs
Got it working! Thanks, that's the tip I needed. -Carl > On Jan 14, 2019, at 1:26 PM, Vince DeMarco wrote: > > Use ImageIO. > > create a CGImageDestinationRef and add the CGImage to it. > > Vince > > > >> On Jan 14, 2019, at 12:17 PM, Carl Hoe

NSImage to JPEG file?

2019-01-14 Thread Carl Hoefs
I have a background macOS daemon process (aka Foundation-based "command line tool") that needs to write out a JPEG file to local disk. The image resides in an NSImage object (or alternatively, an NSData of raw RGB image data). Short of resorting to something like libjpeg, what is the ObjC way t

Re: NSData from dispatch_data_t?

2018-10-30 Thread Carl Hoefs
> On Oct 30, 2018, at 7:49 PM, Greg Parker wrote: > > NSData *nsdata = (NSData *)data_t; > Yes! That works! (I thought I had tried the explicit cast, but I guess I hadn't...) Thanks!! -Carl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple

Re: NSData from dispatch_data_t?

2018-10-30 Thread Carl Hoefs
spatch_data_get_size(dispatch_data_t) on it which would let you create an > NSData object. > > https://developer.apple.com/documentation/dispatch/1452977-dispatch_data_get_size?language=objc > > -Ryan > > On Tue, Oct 30, 2018 at 7:26 PM Carl Hoefs > wrote: > I

NSData from dispatch_data_t?

2018-10-30 Thread Carl Hoefs
Is it possible to create an NSData object from a dispatch_data_t? I'm interfacing to a 3rd party library that returns only a dispatch_data_t object. Once upon a time you could simply cast that to (NSData *) and work with it that way, but Xcode now flags it as an error: dispatch_data_t data_

Re: AirPrint in iOS 11?

2018-05-11 Thread Carl Hoefs
y/content/samplecode/PrintBanner/Introduction/Intro.html#//apple_ref/doc/uid/DTS40013422 > >> On May 11, 2018, at 7:54 PM, Carl Hoefs >> wrote: >> >> As an addendum: I've verified that I can print from the iPhone Photos app >> to my printer using AirPri

Re: AirPrint in iOS 11?

2018-05-11 Thread Carl Hoefs
ess. -Carl > On May 11, 2018, at 5:55 PM, Alex Zavatone wrote: > > I did it a few months ago. Have you tried the sample code? > > https://developer.apple.com/library/content/samplecode/PrintBanner/Introduction/Intro.html#//apple_ref/doc/uid/DTS40013422 > >> On Ma

Re: AirPrint in iOS 11?

2018-05-11 Thread Carl Hoefs
As an addendum: I've verified that I can print from the iPhone Photos app to my printer using AirPrint. The issue is doing it programmatically. > On May 11, 2018, at 5:50 PM, Carl Hoefs > wrote: > > Is printing from iOS still possible? Is AirPrint still a viable SDK to use

AirPrint in iOS 11?

2018-05-11 Thread Carl Hoefs
Is printing from iOS still possible? Is AirPrint still a viable SDK to use? I can get AirPrint to bring up a printer selection screen, but it won't actually select a printer. I present the printer selection screen: UIPrinterPickerController *printPicker = [UIPrinterPickerContro

Re: Is "-init" really needed?

2017-08-07 Thread Carl Hoefs
> On Aug 7, 2017, at 5:17 PM, じょいすじょん > wrote: > >> >> On Aug 8, 2017, at 9:09, Jens Alfke wrote: >> >> >>> On Aug 7, 2017, at 5:02 PM, David Hoerl wrote: >>> >>> But then I though - heck, if Foo has NSObject as its super class, gee, >>> maybe -init isn't really need. I mean, if all of F

Single-channel video recording in iOS?

2017-06-23 Thread Carl Hoefs
iOS 10.3.2 I'd like to do monochrome (or single channel red) video recording, but it seems iOS does not support this. According to AVCaptureVideoDataOutput -availableVideoCVPixelFormatTypes, the only supported pixel format types available for the iPad Pro in iOS 10.3.2 are: '420v' - kCVPix

Re: AVCaptureMovieFileOutput + encryption

2017-06-23 Thread Carl Hoefs
> On Jun 23, 2017, at 11:58 AM, Jens Alfke wrote: > >> On Jun 23, 2017, at 10:22 AM, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> At this high frame rate, I'm expecting that callbacks would not be able to >> keep up in

Re: AVCaptureMovieFileOutput + encryption

2017-06-23 Thread Carl Hoefs
> On Jun 23, 2017, at 11:18 AM, Quincey Morris > wrote: > > On Jun 23, 2017, at 10:51 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> it analyses specific processes in the body which are indicative of a certain >> pathology >

Re: AVCaptureMovieFileOutput + encryption

2017-06-23 Thread Carl Hoefs
> On Jun 23, 2017, at 10:33 AM, Steve Bird wrote: > >> On Jun 23, 2017, at 1:22 PM, Carl Hoefs >> wrote: > >> I'm currently recording 1280x720 at 240fps H.264 video on the iPhone > > Just curious - can you tell us what you are recording at 240 fps ? &g

Re: AVCaptureMovieFileOutput + encryption

2017-06-23 Thread Carl Hoefs
> On Jun 22, 2017, at 11:30 PM, Jens Alfke wrote: > >> On Jun 22, 2017, at 5:18 PM, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> Is it possible to add encryption to this chain, so the movie file is written >> out encrypted?

AVCaptureMovieFileOutput + encryption

2017-06-22 Thread Carl Hoefs
iOS 10.3.2 Using AVFoundation, I've set up an AVCaptureSession, and added an AVCaptureMovieFileOutput to it. This stores the recorded video in the sandbox as a movie file. Is it possible to add encryption to this chain, so the movie file is written out encrypted? -Carl

Re: How to validate Core Data attributes ? (example in official doc doesn't work)

2017-06-14 Thread Carl Hoefs
> On Jun 14, 2017, at 12:26 AM, Quincey Morris > wrote: > > On Jun 13, 2017, at 23:54 , Glen Huang wrote: >> >> what do you use instead of Core Data? > > I ended up writing my own object graph framework. Interestingly, many parts > of the implementation fell naturally into the same mechanis

Re: Binary floating point format

2017-03-30 Thread Carl Hoefs
> On Mar 30, 2017, at 9:06 PM, Greg Parker wrote: > > >> On Mar 30, 2017, at 9:03 PM, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >>> On Mar 30, 2017, at 8:10 PM, Greg Parker >> <mailto:gpar...@apple.com>>

Re: Binary floating point format

2017-03-30 Thread Carl Hoefs
> On Mar 30, 2017, at 8:10 PM, Greg Parker wrote: > >> >> On Mar 30, 2017, at 7:09 PM, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> >>> On Mar 30, 2017, at 6:40 PM, Steve Bird >> <mailto:sb...@culverson.com>

Re: Binary floating point format

2017-03-30 Thread Carl Hoefs
> On Mar 30, 2017, at 7:04 PM, Greg Parker wrote: > > Simply shuffling VAX bytes and interpreting as an IEEE double would be > misleadingly close but still wrong. You are right. Without anything to go on, it's a hopeless task. I really need to bump this back and try to get a hold of somebody

Re: Binary floating point format

2017-03-30 Thread Carl Hoefs
> On Mar 30, 2017, at 6:40 PM, Steve Bird wrote: > > >> On Mar 30, 2017, at 8:25 PM, Carl Hoefs >> wrote: >> >> I have megabytes of raw legacy science datasets that I'm trying to read into >> my app and ingest into an array of doubles. The data

Binary floating point format

2017-03-30 Thread Carl Hoefs
I have megabytes of raw legacy science datasets that I'm trying to read into my app and ingest into an array of doubles. The data is supposed to be organized as a stream of 8-byte doubles. I do not know how these datasets were generated, so I don't know what format (big/little endian, byte swapp

Re: UITextField width of UIAlertController -addTextFieldWithConfigurationHandler:

2017-03-21 Thread Carl Hoefs
houldBeginEditing. > Saagar Jha > >> On Mar 21, 2017, at 12:24, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> Alternately, is there a way to configure the alert to defer the launch of >> the keyboard until/unless the user wants to edit the te

Re: UITextField width of UIAlertController -addTextFieldWithConfigurationHandler:

2017-03-21 Thread Carl Hoefs
cting. - Carl > On Mar 21, 2017, at 12:12 PM, Carl Hoefs > wrote: > > Thanks for the hint. In the debugger I discovered that what looks to be a > UITextField displayed across the bottom of the alert is actually implemented > as a private object of class UIAlertControllerTextField.

Re: UITextField width of UIAlertController -addTextFieldWithConfigurationHandler:

2017-03-21 Thread Carl Hoefs
wrote: > > I haven’t tested this, but have you tried calling [self layoutIfNeeded] in > the completion block of [self presentViewController:animated:completion]? > > Saagar Jha > >> On Mar 20, 2017, at 16:09, Carl Hoefs > <mailto:newsli...@autonomy.ca

UITextField width of UIAlertController -addTextFieldWithConfigurationHandler:

2017-03-20 Thread Carl Hoefs
iOS 10.2.1 I'm using UIAlertController -addTextFieldWithConfigurationHandler: to display an alert with a textfield. Is there any way to shorten the width of the displayed textfield? I've tried setting its frame/bounds, but it has no effect. -Carl _

Re: NSMutableData +dataWithLength: sets errno?

2017-03-14 Thread Carl Hoefs
> On Mar 14, 2017, at 4:27 PM, Greg Parker wrote: > >> >> On Mar 14, 2017, at 4:08 PM, John McCall > <mailto:rjmcc...@apple.com>> wrote: >> >>> On Mar 14, 2017, at 7:00 PM, Carl Hoefs >> <mailto:newsli...@autonomy.caltech.edu>> wrot

  1   2   3   >