Re: Lost memory, GCD, dispatch sources, Cocoa bindings & User interface

2015-09-17 Thread Sandy McGuffog
Based on that, where you’re losing memory is to bitmapped backed CALayers that aren’t being released. Depending on the size of the bitmap, they can be big - MBs each. They are being allocated in the Kernel, so aren’t showing in instruments. Why they aren’t being released, I couldn’t say. Maybe a

Re: device-pixel-exact bitmap rendering

2016-12-19 Thread Sandy McGuffog
Having been down this rat hole once or twice for my apps, I can only tell you my understanding. Which may or may not have any bearing on reality: If you select a “non-native" display mode, then the display/display driver are responsible for the conversion from the selected resolution to native

Re: dispatch_sync(dispatch_get_main_queue() UI weirdness

2014-09-05 Thread Sandy McGuffog
Difficult to know exactly what's happening in your situation, but I’d be inclined to try something like: dispatch_time_t duration = dispatch_walltime(DISPATCH_TIME_NOW, offset_nsec); dispatch_after(duration, dispatch_get_main_queue(), ^{

Re: App crashes on launch when using Developer ID-signed Mac Installer Package

2015-02-11 Thread Sandy McGuffog
Brad, Yes, Xcode 6 breaks what used to be valid signing workflows under previous versions. Unfortunately, Apple’s documentation hasn’t caught up, and most of DTS is clueless on this subject. It took me literally months to get a useful answer. This BTW is not a bug, it is apparently as a result

Re: App crashes on launch when using Developer ID-signed Mac Installer Package

2015-02-11 Thread Sandy McGuffog
Alex, Don’t know….in my case, this was OS X Sandy > On Feb 11, 2015, at 8:25 PM, Alex Zavatone wrote: > > Any idea if this only affects OS X or does it also affect iOS? > > Sent from my iPad. Please pardon typos. > > On Feb 11, 2015, at 12:55 PM, Sandy McGuff

Re: Thread-safe atomic property for array

2015-08-15 Thread Sandy McGuffog
> On Aug 15, 2015, at 1:14 PM, Mike Abdullah wrote: > > NSArray *array = [hostObject myArray]; > // run your checks, etc. > NSString *someString = [array objectAtIndex:2]; Just to be safe: NSArray *array = [[hostObject myArray] retain]; // run your checks, etc. NSString *someString = [array ob

Re: Thread-safe atomic property for array

2015-08-15 Thread Sandy McGuffog
lah wrote: > > >> On 15 Aug 2015, at 13:07, Sandy McGuffog wrote: >> >> >>> On Aug 15, 2015, at 1:14 PM, Mike Abdullah wrote: >>> >>> NSArray *array = [hostObject myArray]; >>> // run your checks, etc. >>> NSString *someString

Re: Thread-safe atomic property for array

2015-08-15 Thread Sandy McGuffog
On 15 Aug 2015, at 13:21, Sandy McGuffog wrote: >> >> What guarantees that the current autorelease cycle doesn’t end in the middle >> of this code? > > If it does end in the middle of this code, that’s something the author of the > code is doing specially and mus

Re: Overcoming crappiness of NSSplitView - what's the magic?

2009-09-15 Thread Sandy McGuffog
Below is what I ended up doing to solve a similar problem. Which is really seriously ugly, but has worked for me. Your mileage may vary.. Sandy - (void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize: (NSSize)oldSize { NSArray *subviewList = [sender subviews];

Re: TIFFRepresentation, different TIFF format under Snow Leopard

2009-10-12 Thread Sandy McGuffog
Actually, that occurred under 10.5 as well - what happens is that some operations, it would seem those involving Core Image, cause the internal representation to go to RGBA. Which is fine, but there doesn't seem to be a way to write a plain RGB format TIFF. I had to incorporate a third-part

Re: TIFFRepresentation, different TIFF format under Snow Leopard

2009-10-12 Thread Sandy McGuffog
lementation of the TIFF writer is, practically speaking, useless to me. Sandy On Oct 12, 2009, at 11:24 PM, Paul M wrote: On 13/10/2009, at 4:39 AM, Sandy McGuffog wrote: Actually, that occurred under 10.5 as well - what happens is that some operations, it would seem those involving Core Im

Re: TIFFRepresentation, different TIFF format under Snow Leopard

2009-10-13 Thread Sandy McGuffog
Ken, Just for clarity here, my problem, although not the original poster's, is not around internal representation - I'm happy with with whatever comes along in that regard. My problem is that if you want to write out a Core Image rep as TIFF, there is no obvious way to specify that you wa

Re: Anyone using IKImageView?

2010-03-17 Thread Sandy McGuffog
I speak from memory here, but my recollection is that IKImageView does not like going in a scrollview; you put an NSScroller next to it, and hook that to one of the IKImageView's scroller outlets. Or something like that - there is a Apple demo app that shows this. Sandy On Mar 16, 2010, at 11

Re: Anyone using IKImageView?

2010-03-17 Thread Sandy McGuffog
ImageBrowser, I think. Sandy On Mar 17, 2010, at 5:22 PM, Brian Postow wrote: > > On Mar 17, 2010, at 10:42 AM, Sandy McGuffog wrote: > >> I speak from memory here, but my recollection is that IKImageView does not >> like going in a scrollview; you put an NSScroller next

Re: ALAssetsLibrary and iOS5

2011-10-28 Thread Sandy McGuffog
Just looking at the code, one issue that you might be running into is that for ALAssetsLibrary under iOS 5, to quote from the Apple docs, "The lifetimes of objects you get back from a library instance are tied to the lifetime of the library instance." In this case, it's not at all clear to me th

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-09 Thread Sandy McGuffog
In my experience, and I'm the author of PhotoRaw, which uses LOTS of memory for raw image conversion, 128MB is very optimistic. 50-70 on e.g., an iPad 1 is more like it, and even then there will be occasional situations where you get terminated. Sandy On Nov 9, 2011, at 11:00 PM, David Duncan

Re: I think I'm ready to throw in the towel - I really need help here

2012-01-25 Thread Sandy McGuffog
Inkscape - free, is a vector editor so you can export bitmaps at whatever resolution you want, and there are huge numbers of public domain SVG images on the net that you can repurpose. I use Inkscape for all my icons, etc. There's also a good "programmers tutorial" here: http://cocoawithlove.co

Inconsistent results from iconForFile

2009-11-27 Thread Sandy McGuffog
Part of my code uses: [[NSWorkspace sharedWorkspace] iconForFile:path]; For some files, I get a thumbnail of the file, so e.g., for a JPEG, I get a miniature of the actual image in the JPEG. But for other files, even in the same directory, I get the file type icon, so e.g., for a JPEG, the OS X

Re: Inconsistent results from iconForFile

2009-11-28 Thread Sandy McGuffog
Jens, Thanks - QuickLook does indeed consistently give the same previews as Finder. Problem solved! Regards, Sandy On Nov 28, 2009, at 8:41 AM, Jens Alfke wrote: > > On Nov 27, 2009, at 10:31 PM, Sandy McGuffog wrote: > >> For some files, I get a thumbnail of the file, so e

Re: Comparing NSImages

2009-07-23 Thread Sandy McGuffog
Well, before you worry about release differences, you should probably worry about the "NSDeviceRGBColorSpace" - if you want consistency between different platforms, I'd think you should be using sRGB, Adobe RGB or similar. Sandy On Jul 23, 2009, at 11:00 PM, Benjamin Rister wrote: We're h

Re: Detect a Retina display

2013-06-20 Thread Sandy McGuffog
What you need is to set base SDK to most recent (10.8), and set deployment target to 10.6 Sandy On Jun 20, 2013, at 5:11 PM, Thierry Cantet wrote: > Hello Richard, > > I have tried your solution, however it does not work. > > I have these messages when I try to build with the base SDK set to

Re: IOS floating point performance

2013-08-08 Thread Sandy McGuffog
Be careful using that code as a test; a good optimizing compiler could pick up that sin is a library function without side effects, and no result is saved, and optimize that loop to two calls to adjustValueRadians. Sandy On Aug 8, 2013, at 8:17 PM, Thomas Wetmore wrote: > David, > > Those a

Re: Display Mail type outlineView numbers

2009-01-06 Thread Sandy McGuffog
You're probably going to have to display an image in an outlineview cell. Start by looking at ImageAndTextCell in the DragNDropOutlineView Developer example The alternative is to place NSAttributedStrings that have images imbedded in the outlineview. But I could never get the formatting to

Re: Stumped on memory problem :(

2009-01-06 Thread Sandy McGuffog
Haven't run the code, but I'd think that what you want is: NSMutableArray *array = [[NSMutableArray alloc] init]; Sandy On 02 Jan 2009, at 3:14 AM, Jacob Rhoden wrote: I have read the memory management documentation over and over but still cannot work out the problem with this code, can anyo

Re: ImageAndTextCell rendering weirdness

2009-01-17 Thread Sandy McGuffog
Well, I haven't seen this specific behavior. But one thought is to check that your images have their size set - as initialized from a [NSImage imageNamed:], size is not set(!). This can cause all sort of havoc. Second comment: there are actually several different versions of ImageandTextCel

Re: Singleton Help ...

2009-03-13 Thread Sandy McGuffog
I'm pretty sure the run-time will sort that all out for you. But I'm a bit confused here - if you're getting an applicationDidTerminate notification, why not just remove them there anyway? Sandy On Mar 13, 2009, at 12:54 PM, Mic Pringle wrote: But I thought that it was best practice to r

Re: Creating a text service

2009-03-15 Thread Sandy McGuffog
Getting a simple text service that doesn't pop any kind of a dialog is pretty easy. However, if you need to show any dialogs, it gets a lot more complicated. If you need a (complex) example, this is a password manager that provides text services as part of what it does: http://sourceforge.net

Re: Autosaving the selection in an NSTableView

2009-04-14 Thread Sandy McGuffog
Not sure about NSTableViews, but with NSOutlineViews, which I'd think behave the same way, the secret sauce is to make sure that your items have all of persistentObjectForItem, initWithPersistentObject, isEqual and hash consistently implemented. Reason being that what is stored to your pref

Re: Best way to save a CIImage to disk

2009-05-05 Thread Sandy McGuffog
I also had (have actually) this problem. The issue appears to be that CoreImage seems to do its own caching. If you watch the retain counts on the underlying image data that you pass to CoreImage, it leave retains in place for a long time. Under testing, when I repeatedly passed an image wi

Re: Sandbox and CIKernel

2013-11-22 Thread Sandy McGuffog
I have used CIKernels in a sandboxed app. Different kernel :) Sandy On Nov 22, 2013, at 5:56 PM, Gordon Apple wrote: > I¹m a little confused as to whether or not one can use a CIKernel in a > samdboxed app. Custom filters often require this and WWDC is full of > examples using such. Sandbox gu

Re: Writing a custom core image filter part 2

2014-02-23 Thread Sandy McGuffog
In the return statement, did you not perhaps mean inputColorProps rather than inputColor? Sandy On Feb 24, 2014, at 12:10 AM, Kevin Meaney wrote: > inputColor, ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: exporting image files to disk using CGImageDestination

2014-02-24 Thread Sandy McGuffog
You should not be seeing worse image quality for TIFF unless very different options are being used in each case. Can you tell what about the image quality is worse? Sandy On Feb 24, 2014, at 7:48 PM, Kevin Meaney wrote: > On 24 Feb 2014, at 17:21, Mike Abdullah wrote: > >> On 24 Feb 2014,

Re: Image without profile gets an sRGB profile on Mavericks

2014-03-23 Thread Sandy McGuffog
Untagged images are a free-for-all - any app or framework can assume whatever it wants for a color space with them, so there’s no “wrongly” about what Mavericks does. It’s just different to previous versions. So far as I am aware, Apple is (strongly) discouraging the use of Device RGB, for the

Re: EXC_BAD_ACCESS in NSData

2014-05-26 Thread Sandy McGuffog
Well, I find your code to be a bit confusing, but I’d say that both of those are wrong. I think that what you need is: unsigned char* databuffer = (unsigned char*)malloc(datasize); [datastream getBytes:databuffer range:NSMakeRange(positionCounter, datasize)]; // Packet content On May 26,

Re: document inexplicably becomes locked and fails to save under sandboxing

2014-06-12 Thread Sandy McGuffog
I don’t know whether this is relevant to your issue, but for what it’s worth, (a) I have had a problem with OS X mysteriously locking files as result of the file being set to "user immutable”, and (b) I know that the autosave functionality in NSDocument interacts with the immutable setting. In

Re: How to refund a customer on mac app store?

2020-10-25 Thread Sandy McGuffog via Cocoa-dev
You can’t. The customer needs to contact Apple directly. > On Oct 25, 2020, at 4:30 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > Is it possible to give a refund to a customer who has bought my app on the > Mac App Store? > > Best regards, Gabriel > > > ___

Re: Sandboxing question regarding ~/Pictures

2021-09-27 Thread Sandy McGuffog via Cocoa-dev
The sandbox is an enigma wrapped in a mystery. But you might need to look at the the com.apple.security.assets.pictures.read-write entitlement > On Sep 27, 2021, at 3:30 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > I guess i still haven't understood something about sandboxing or entitlemen

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Sandy McGuffog via Cocoa-dev
Yet another possible issue is that Apple’s frameworks tend to like to hold onto and reuse objects like CALayers. As a result they also hold onto the contents for much longer than you might think. I would at least try imgLayer.contents = nil as soon as you’re sure the layer won’t be displayed aga