Re: Exceptions and autorelease pools

2011-12-06 Thread Larry Campbell
On Dec 6, 2011, at 4:59 PM, Ken Thomases wrote: > On Dec 6, 2011, at 2:47 PM, Larry Campbell wrote: > >> void allocAndRaise() >> { >> [[[NSString alloc] initWithString:@"foo bar and zot"] autorelease]; >> [NSException raise:@"foo" format:@

Re: Exceptions and autorelease pools

2011-12-06 Thread Larry Campbell
On Dec 6, 2011, at 4:02 PM, Greg Parker wrote: > On Dec 6, 2011, at 12:47 PM, Larry Campbell wrote: >> (Mac OS X 10.6.8, Xcode 4.0.2, no GC) >> >> I believe the following paragraph in the "Using Autorelease Pools" section >> of the "Memory Management

Exceptions and autorelease pools

2011-12-06 Thread Larry Campbell
(Mac OS X 10.6.8, Xcode 4.0.2, no GC) I believe the following paragraph in the "Using Autorelease Pools" section of the "Memory Management Programming Guide" is wrong, or misleading: "This behavior has implications for exceptional conditions. If an exception occurs, and the thread suddenly tran

Why are properties access through NSURLProtocol class method rather than NSURLRequest instance method?

2011-05-15 Thread Larry Campbell
Seems odd to me that setting and getting properties of an NSURLRequest involve an NSURLProtocol class method: +[NSURLProtocol setProperty:forKey:inRequest:] rather than what seems to me the much more straightforward: -[NSMutableURLRequest setProperty:forKey:] Is there a reason for this

NSArrayController selected objects mystery

2011-03-21 Thread Larry Campbell
I am baffled. An NSArrayController I'm using occasionally gets into a state where selectionIndexes returns an NSIndex with one index, 0, which is what I expect and desire, but selectionIndex returns NSNotFound and selectedObjects returns an empty array. How can this be? - lc __

Setting NSTableView column header with Cocoa bindings

2008-12-03 Thread Larry Campbell
I'm having trouble setting the column header title in an NSTableView using Cocoa bindings. No matter what my value method returns, the header title displays as a single open parenthesis. I know, by setting a breakpoint, that my value method is getting called. All other uses of bindings with

Re: NSURL bug with IPv6 addresses

2008-12-03 Thread Larry Campbell
I've opened radar #6414752. - lc On Dec 3, 2008, at 12:34 AM, Kyle Sluder wrote: On Tue, Dec 2, 2008 at 10:59 PM, Larry Campbell <[EMAIL PROTECTED]> wrote: The first line is the correct, desired result; the next two are totally borked. So is this just known to be broken? Or is

NSURL bug with IPv6 addresses

2008-12-02 Thread Larry Campbell
This snippet: url = [[[NSURL alloc] initWithString:@"http:// [2001:4860:0:2001::68]/"] autorelease]; NSLog(@"url host=\"[EMAIL PROTECTED]", absolute string=\"[EMAIL PROTECTED]"", [url host], [url absoluteString]); url = [[[NSURL alloc] initWithScheme:@"http" host:@"2001:4860:0:

Re: NSLog goes to system.log, and it should not

2008-03-09 Thread Larry Campbell
ore information on this topic: http://lapcatsoftware.com/blog/2008/01/06/logging-in-leopard/ http://boredzo.org/blog/archives/2008-01-19/next-week-apple-system-logger -Jeff On Mar 9, 2008, at 11:08 PM, Larry Campbell wrote: The NSLog(v) documentation says: NSLogv writes the log to STDERR_FIL

NSLog goes to system.log, and it should not

2008-03-09 Thread Larry Campbell
The NSLog(v) documentation says: NSLogv writes the log to STDERR_FILENO if the file descriptor is open. If that write attempt fails, the message is sent to the syslog subsystem, if it exists on a platform, with the LOG_USER facility (or default facility if LOG_USER does not exist), with