Re: NSImage from bitmap - then delete bitmap

2016-07-21 Thread Graham Cox
> On 22 Jul 2016, at 4:40 PM, Trygve Inda wrote: > > >> With half an eye on performance, if you *do* strictly need a copy of the >> bitmap, note that NSBitmapImageRep conforms to NSCopying. You don’t have to >> turn it into a TIFF and back again. >> >> Also, you don’t even need an NSImage - th

Re: NSImage from bitmap - then delete bitmap

2016-07-21 Thread Trygve Inda
> With half an eye on performance, if you *do* strictly need a copy of the > bitmap, note that NSBitmapImageRep conforms to NSCopying. You don’t have to > turn it into a TIFF and back again. > > Also, you don’t even need an NSImage - the NSImageRep can be drawn directly. A little deeper discuss

Re: NSImage from bitmap - then delete bitmap

2016-07-21 Thread Graham Cox
> On 22 Jul 2016, at 4:08 PM, Trygve Inda wrote: > > I don't think the second part will work because of my workflow: > > At Launch: Create pixel buffer that is 1000 x 1000 pixels > > Looping thread > 1. Fill pixel buffer with pixels based on some algorithm > 2. create an NSImage with these pix

Re: NSImage from bitmap - then delete bitmap

2016-07-21 Thread Ken Thomases
On Jul 22, 2016, at 1:08 AM, Trygve Inda wrote: > >> But that’s not a great way to do this. You’ve made an image, you’ve encoded >> it >> as TIFF data, then you’ve made a new image, which has decoded the TIFF data >> to >> make a new image rep/bitmap. >> >> You could just add the representatio

Re: NSImage from bitmap - then delete bitmap

2016-07-21 Thread Trygve Inda
> >> On 22 Jul 2016, at 3:37 PM, Trygve Inda wrote: >> >> I create an NSBitmapImageRep: >> >> [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL >> pixelsWide:pixelSize.width >> pixelsHigh:pixelSize.height >> bitsPerSample:8 >> samplesPerPixel:4 >> hasAlpha:YES >> isPlanar:NO >> colorSpac

Re: NSImage from bitmap - then delete bitmap

2016-07-21 Thread Ken Thomases
On Jul 22, 2016, at 12:37 AM, Trygve Inda wrote: > > I create an NSBitmapImageRep: > > [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL > pixelsWide:pixelSize.width > pixelsHigh:pixelSize.height > bitsPerSample:8 > samplesPerPixel:4 > hasAlpha:YES > isPlanar:NO > colorSpaceName:NSDeviceR

Re: NSImage from bitmap - then delete bitmap

2016-07-21 Thread Graham Cox
> On 22 Jul 2016, at 3:37 PM, Trygve Inda wrote: > > I create an NSBitmapImageRep: > > [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL > pixelsWide:pixelSize.width > pixelsHigh:pixelSize.height > bitsPerSample:8 > samplesPerPixel:4 > hasAlpha:YES > isPlanar:NO > colorSpaceName:NSDevice

NSImage from bitmap - then delete bitmap

2016-07-21 Thread Trygve Inda
I create an NSBitmapImageRep: [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:pixelSize.width pixelsHigh:pixelSize.height bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace bitmapFormat:NSAlphaFirstBitmapFormat bytesPerRow:pixelSize.

Re: Ending NSTask doesn't release file handle opened by the task it wraps.

2016-07-21 Thread Graham Cox
> On 22 Jul 2016, at 9:22 AM, Uli Kusterer wrote: > > On 21 Jul 2016, at 17:20, Graham Cox wrote: >> One of my apps uses NSTask to wrap a command line utility that is embedded >> in the same app’s resources. This utility writes files to disk - I have no >> knowledge of which APIs it uses to d

Re: Ending NSTask doesn't release file handle opened by the task it wraps.

2016-07-21 Thread じょいすじょん
> On 22 Jul 2016, at 8:22, Uli Kusterer wrote: > > On 21 Jul 2016, at 17:20, Graham Cox wrote: >> One of my apps uses NSTask to wrap a command line utility that is embedded >> in the same app’s resources. This utility writes files to disk - I have no >> knowledge of which APIs it uses to do t

Re: Ending NSTask doesn't release file handle opened by the task it wraps.

2016-07-21 Thread Uli Kusterer
On 21 Jul 2016, at 17:20, Graham Cox wrote: > One of my apps uses NSTask to wrap a command line utility that is embedded in > the same app’s resources. This utility writes files to disk - I have no > knowledge of which APIs it uses to do this. If the task has ended (and I can > see that the act

Re: Ending NSTask doesn't release file handle opened by the task it wraps.

2016-07-21 Thread Daniel Stenmark
Do you have any NSPipes or NSFileHandles set on the NSTask’s I/O channels? (standardOutput, standardError, and standardInput) Dan > On Jul 21, 2016, at 8:20 AM, Graham Cox wrote: > > One of my apps uses NSTask to wrap a command line utility that is embedded in > the same app’s resources. This

Re: Ending NSTask doesn't release file handle opened by the task it wraps.

2016-07-21 Thread Jens Alfke
That’s strange. I would use the `lsof` tool to figure out which process has that file open. You can also use `fs_usage` while the tool is running to monitor all the filesystem activity on that file. —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

unexpected NSTextViewDelegate behavior

2016-07-21 Thread David Young
Sometimes my implementation of NSTextViewDelegate method textView:shouldChangeTextInRanges:replacementStrings: is called with different arguments than I expect. Maybe I have overlooked some way to get the desired behavior? Here is an example of the behavior. I select a character, the 'w' in the

Ending NSTask doesn't release file handle opened by the task it wraps.

2016-07-21 Thread Graham Cox
One of my apps uses NSTask to wrap a command line utility that is embedded in the same app’s resources. This utility writes files to disk - I have no knowledge of which APIs it uses to do this. If the task has ended (and I can see that the actual instance of the running command line tool has dis

Re: Do Debug Apps Expire on iOS?

2016-07-21 Thread Roland King
> On 21 Jul 2016, at 22:15, Steve Bird wrote: > > >> On Jul 21, 2016, at 10:05 AM, Eric E. Dolecki wrote: >> >> I believe that debug apps built directly to hardware have a shelf life of >> one year. At least they did. > > I don’t know, but I would hope that they would pop up some notice lik

Re: Do Debug Apps Expire on iOS?

2016-07-21 Thread Eric E. Dolecki
File a Radar for that. I agree that would be nice, but normally a year should be plenty when you're getting debug help from other users. On Thu, Jul 21, 2016 at 10:15 AM Steve Bird wrote: > > > On Jul 21, 2016, at 10:05 AM, Eric E. Dolecki > wrote: > > > > I believe that debug apps built direct

Re: Do Debug Apps Expire on iOS?

2016-07-21 Thread Steve Bird
> On Jul 21, 2016, at 10:05 AM, Eric E. Dolecki wrote: > > I believe that debug apps built directly to hardware have a shelf life of > one year. At least they did. I don’t know, but I would hope that they would pop up some notice like “This app has expired. Contact the developer for the curre

Re: Do Debug Apps Expire on iOS?

2016-07-21 Thread Eric E. Dolecki
I believe that debug apps built directly to hardware have a shelf life of one year. At least they did. It sounds like you have a problem with your application (bug) that you should track down before releasing to the store. Trying looking at the crash log(s) for your application from your device an

Do Debug Apps Expire on iOS?

2016-07-21 Thread Charles Jenkins
I have an app (written in Swift) that’s nearly ready to submit to the app store. I just need to get better background music. But it seems that every few weeks, it stops launching on my iPhone. It seems whenever I want to show it off, it won’t start. It dies after the launch screen appears. Then wh