Re: NSTableView not setting -clickedRow, -clickedColumn as it should

2012-08-09 Thread Markus Spoettl
On 8/9/12 12:58 AM, Graham Cox wrote: NSCell apparently uses NSCopyObject() to make a copy of itself, and NSTableView copies cells at times, e.g. for hit testing. If you have a custom cell subclass that supports copying, DO NOT use [super copyWithZone:] followed by your custom copy stuff. Since

Re: NSTableView not setting -clickedRow, -clickedColumn as it should

2012-08-09 Thread Markus Spoettl
On 8/9/12 8:14 AM, Markus Spoettl wrote: On 8/9/12 12:58 AM, Graham Cox wrote: NSCell apparently uses NSCopyObject() to make a copy of itself, and NSTableView copies cells at times, e.g. for hit testing. If you have a custom cell subclass that supports copying, DO NOT use [super copyWithZone:]

Re: NSTableView not setting -clickedRow, -clickedColumn as it should

2012-08-09 Thread Graham Cox
On 09/08/2012, at 4:14 PM, Markus Spoettl ms_li...@shiftoption.com wrote: Not calling super sounds like a bad idea. Yep, I realise that now. So call super, but you need to know whether it's going to call through your -init method or not (for cells, it does not). --Graham

Re: NSTableView not setting -clickedRow, -clickedColumn as it should

2012-08-09 Thread Quincey Morris
On Aug 9, 2012, at 00:04 , Graham Cox graham@bigpond.com wrote: So call super, but you need to know whether it's going to call through your -init method or not (for cells, it does not). Except that you do sort-of know (I think). If it does, all your instance variables are 0. If you have

Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)

2012-08-09 Thread Jean-Daniel Dupas
Le 9 août 2012 à 02:01, Greg Parker gpar...@apple.com a écrit : On Aug 8, 2012, at 4:52 PM, Graham Cox graham@bigpond.com wrote: I see that NSCopyObject is deprecated as of 10.8 (but is still being used internally). This is going to be fun moving forward :) I'm not sure how binary

Re: NSTableView not setting -clickedRow, -clickedColumn as it should

2012-08-09 Thread Graham Cox
On 09/08/2012, at 5:31 PM, Quincey Morris quinceymor...@rivergatesoftware.com wrote: So call super, but you need to know whether it's going to call through your -init method or not (for cells, it does not). Except that you do sort-of know (I think). If it does, all your instance

Re: filtering the values in an NSTableColumn

2012-08-09 Thread Koen van der Drift
Ok, doing some more thinking, but am not at my Mac now to test it. Maybe I should use a predicate, something like this: valueFilter = [NSPredicate predicateWithFormat:@%@ value %@, self.minimumValue, self.maximumValue]; [myArrayController setFilterPredicate: valueFilter]; As I said I'm

Exception on ^⌘D when AppKit tries to use Lookup on my custom view

2012-08-09 Thread Markus Spoettl
I have custom views that can become first responder. If one of them is and I press CTRL-COMMAND-D, my App silently throws an exception, no log is generated (call stack below). I have a main menu item that uses the same key equivalent (CTRL-COMMAND-D) and for some reason this never happened

Re: filtering the values in an NSTableColumn

2012-08-09 Thread Ken Thomases
On Aug 9, 2012, at 7:58 AM, Koen van der Drift wrote: Maybe I should use a predicate, something like this: valueFilter = [NSPredicate predicateWithFormat:@%@ value %@, self.minimumValue, self.maximumValue]; [myArrayController setFilterPredicate: valueFilter]; As I said I'm not able

[MEET] CocoaHeadsNYC -- *tonight*, 6:30PM

2012-08-09 Thread Andy Lee
David Jacobs and Natalie Podrazik will talk about writing newsstand apps. No RSVP required -- details here: http://www.cocoaheadsnyc.org/meeting/ Hope to see you there. --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Exception on ^⌘D when AppKit tries to use Lookup on my custom view

2012-08-09 Thread Markus Spoettl
It doesn't seem like this is one of my better days. I mixed up things, I actually used a different key equivalent, so there's no wonder my menu item didn't work. Arghh. Sorry for the noise! That leaves the exception that still happens. Any way to get rid of that? Or should I ignore it?

Crash in heartbeat thread while progress indicator showing

2012-08-09 Thread Jerry Krinock
A user reported a non-reproducible crash in the heartbeat thread while my app was showing an alert window with a progress indicator. In list archives I've read that this may be due to (a) a memory management bug in my code or (b) a bug in Mac OS X. Both of these seem unlikely since I've been

How to...

2012-08-09 Thread Charlie Dickman
I am trying to get the unix say command to speak the text I am writing to a file using the following... NSTask *ls = [[NSTask alloc] init]; NSFileHandle *stdIn = [NSFileHandle fileHandleForReadingAtPath: txtFilePath];

Re: Exception on ^⌘D when AppKit tries to use Lookup on my custom view

2012-08-09 Thread Lee Ann Rucker
You didn't say what the exception is, but I can guess: NSAccessibilityException, telling you that your custom view doesn't implement accessibility. If it's not logging, you can break on exceptions and find out which attributes it wants. Implementing accessibility isn't that hard, there's just

Re: NSTableView not setting -clickedRow, -clickedColumn as it should

2012-08-09 Thread Kyle Sluder
On Wed, Aug 8, 2012, at 04:37 PM, Kyle Sluder wrote: It does make it easier for subviews that want to perform their own NSEvent handling to do so, but now I'm having the darndest time figuring out how that interacts with the highlight NSTableView draws around right-clicked rows. It's supposed

Re: Exception on ^⌘D when AppKit tries to use Lookup on my custom view

2012-08-09 Thread Markus Spoettl
OK, thanks. I'm not sure how to find that out, since I only have a call stack and none of it is in my code except main.m. I have a symbolic exception breakpoint, that's where my app stops. Telling from the function names it's accessibility. Regards Markus On 8/9/12 7:09 PM, Lee Ann Rucker

Re: How to...

2012-08-09 Thread Jens Alfke
On Aug 9, 2012, at 10:00 AM, Charlie Dickman 3tothe...@comcast.net wrote: NSTask *ls = [[NSTask alloc] init]; NSFileHandle *stdIn = [NSFileHandle fileHandleForReadingAtPath: txtFilePath]; [ls

Re: Crash in heartbeat thread while progress indicator showing

2012-08-09 Thread Ken Thomases
On Aug 9, 2012, at 11:41 AM, Jerry Krinock wrote: A user reported a non-reproducible crash in the heartbeat thread while my app was showing an alert window with a progress indicator. In list archives I've read that this may be due to (a) a memory management bug in my code or (b) a bug in

Re: How to...

2012-08-09 Thread Ken Thomases
On Aug 9, 2012, at 1:29 PM, Jens Alfke wrote: On Aug 9, 2012, at 10:00 AM, Charlie Dickman 3tothe...@comcast.net wrote: NSTask *ls = [[NSTask alloc] init]; NSFileHandle *stdIn = [NSFileHandle fileHandleForReadingAtPath:

AuthorizationExecuteWithPrivileges vs SMJobBless

2012-08-09 Thread Trygve Inda
I am using AuthorizationExecuteWithPrivileges to copy a prefPane from its installed location to the trash as part of the action on an uninstall button. It runs /bin/mv on the file/package Of course this is only if the pane is in /Library/PreferencePanes since if it is in

Re: Crash in heartbeat thread while progress indicator showing

2012-08-09 Thread Jerry Krinock
On 2012 Aug 09, at 11:40, Ken Thomases k...@codeweavers.com wrote: On Aug 9, 2012, at 11:41 AM, Jerry Krinock wrote: A user reported a non-reproducible crash in the heartbeat thread while my app was showing an alert window with a progress indicator. In list archives I've read that this

Re: Crash in heartbeat thread while progress indicator showing

2012-08-09 Thread Ken Thomases
On Aug 9, 2012, at 2:11 PM, Jerry Krinock wrote: Thank you, Ken. Here's more… Code Type: X86 (Native) Parent Process: launchd [305] User ID: 501 Date/Time: 2012-08-09 17:13:50.369 +0200 OS Version: Mac OS X 10.8 (12A269) Report Version: 10 Interval Since

Re: How to...

2012-08-09 Thread Charlie Dickman
I tried the Speech Synthesizer Manager too. It suffers from the same deficiency that NSSpeechSynthesizer does. I suspect that NSSpeechSynthesizer uses the Speech Synthesis Manager internally. On Aug 9, 2012, at 2:51 PM, Ken Thomases wrote: On Aug 9, 2012, at 1:29 PM, Jens Alfke wrote: On

Re: How to...

2012-08-09 Thread Quincey Morris
On Aug 9, 2012, at 15:05 , Charlie Dickman 3tothe...@comcast.net wrote: I tried the Speech Synthesizer Manager too. It suffers from the same deficiency that NSSpeechSynthesizer does. I suspect that NSSpeechSynthesizer uses the Speech Synthesis Manager internally. One alternative, if you're

Simple date format problem? iOS 5

2012-08-09 Thread Alex Kac
We archive our database files and use the following code to name them. We've been using the same code for about 3 years without any issues but today I have one user that is exhibiting very strange results. I'm assuming I'm missing something very basic, simple, but I'm just not seeing it. Here

containerURLForSecurityApplicationGroupIdentifier

2012-08-09 Thread koko
When I call: containerURLForSecurityApplicationGroupIdentifier on NSURL I get unknown selector yet the docs say this is how to get the path to the app group container. Is this is bug ? -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Simple date format problem? iOS 5

2012-08-09 Thread Dave DeLong
I'm going to venture out on a limb and say you shouldn't be using NSDateFormatter for this. NSDateFormatter is really only useful when you're converting a date to-and-from a human-readable form. The way you're using it, it's not human-readable, and will cause you problems in very subtle ways.

Re: Storing strings in code

2012-08-09 Thread Leo
Thanks everybody for all the suggestions! I got the point: there's no way to do this easier than I already do. I don't need any sophisticated security. All I want is that if someone opens the executable in a text editor, the paths of certain two files to not appear in plain text. For this

Re: Simple date format problem? iOS 5

2012-08-09 Thread Jens Alfke
On Aug 9, 2012, at 6:26 PM, Dave DeLong davedel...@me.com wrote: I'm going to venture out on a limb and say you shouldn't be using NSDateFormatter for this. NSDateFormatter is really only useful when you're converting a date to-and-from a human-readable form. The way you're using it,

Re: Simple date format problem? iOS 5

2012-08-09 Thread Alex Kac
That's what I thought. We'll try it with the locale and calendar identifier set. Yes, we could get a CFGregorian and just format it with stringForFormat...but this seems nice and simple too. On Aug 9, 2012, at 8:35 PM, Jens Alfke j...@mooseyard.com wrote: On Aug 9, 2012, at 6:26 PM, Dave

Re: How to...

2012-08-09 Thread Charlie Dickman
I have solved my problem as follows; if there is any memory leak inside the speech synthesizer it is isolated to the spawned task and is short lived and outside of my app. NSTask *ls = [[NSTask alloc] init]; NSString *thePhrase = [NSString stringWithFormat:

Re: Simple date format problem? iOS 5

2012-08-09 Thread Quincey Morris
On Aug 9, 2012, at 18:26 , Dave DeLong davedel...@me.com wrote: Since you want an unlocalized date, you should just use [NSString stringWithFormat:] to build the name yourself, after breaking the NSDate up into its NSDateComponents using the Gregorian calendar. I'd vote for this solution,

Re: containerURLForSecurityApplicationGroupIdentifier

2012-08-09 Thread Graham Cox
On 10/08/2012, at 11:16 AM, koko k...@highrolls.net wrote: yet the docs say this is how to get the path to the app group container. Is this is bug ? It doesn't exist. The documentation is wrong, and I see no alternative. File bugs and ask on the sandboxing dev forum. Another FAIL from

Re: reading preferences from com.apple.mail under 10.8

2012-08-09 Thread Reimers, Gabriel
In Mountain Lion Mail is a sandboxed app. Therefore it now stores it's preferences in ~/Library/Containers/com.apple.mail/Data/Library/Preferences Gabriel On 02.08.12 07:44, cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com wrote: On Jul 31, 2012, at 8:07 AM, Rob McBroom

Saving image to disk in HiDPI / Retina MacBook

2012-08-09 Thread Nala Gnirut
Hi all, in one of my apps I'm saving some images like this: *** NSImage *finalIcon = [[NSImage alloc] initWithSize:finalSize]; [finalIcon lockFocus]; // Some drawing on finalIcon here NSBitmapImageRep *imgRep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:NSMakeRect(0, 0, finalSize.width,

Re: 32-bit on 10.8

2012-08-09 Thread Kurt Bigler
On 8/2/12 12:29 PM, Charles Srstka wrote: On Aug 2, 2012, at 1:57 PM, koko k...@highrolls.net wrote: Thanks. I asked the question because I saw here one time that you don't want to be the app causing 32-bit versions to load. As long as it is not a system resource problem, then all is well

PocketSVG

2012-08-09 Thread Ariel Elkin
Hello all, For all of you interested in vector graphics on iOS, here's a library that parses an SVG's d attribute into a UIBezierPath, allowing you to use a pre-existing SVG file to create vector-based paths and shapes. https://github.com/arielelkin/PocketSVG The library is still in its

Not getting all the data over the cell network

2012-08-09 Thread Stevo Brock
We are seeing quite an odd situation in our app. When running the app on an iPhone 4 with iOS 4.3.5 (other combinations also exhibit this behavior but I don't have the exact details at the moment) and forcing data traffic to go over the cell network, our URL data loading calls are often not

Navigating in a NSTableView with tab key

2012-08-09 Thread François Pelsser
Hello, I want to be able to navigate in a table view with the tab key. So i subclassed NSTableView and i added the overwrite the method - (void) textDidEndEditing: (NSNotification *) notification { CellLoc editedCell; editedCell.col = [super editedColumn]; editedCell.row =

NSUserDefaults locks up on 10.8

2012-08-09 Thread Martin Hewitson
Dear list, I believe this problem is new on 10.8 (but I can't confirm this at the moment). I have a table view bound to shared user defaults with a key which returns an array of strings. I have a button for creating a new entry. This calls a piece of code like this: NSUserDefaults

Re: 32-bit on 10.8

2012-08-09 Thread Nick Zitzmann
On Aug 2, 2012, at 7:02 PM, Kurt Bigler kkbli...@breathsense.com wrote: I'd seriously wish for some statement from Apple ASAP if that were a possibility that 32-bit support would be fully eliminated in 10.9. You won't get one. But between you and me, I would say it is highly unlikely, since