From: Christiaan H. <cmh...@gm...> - 2007-01-19 17:53:59
|
On 19 Jan 2007, at 6:42 PM, Adam R. Maxwell wrote: > > On Friday, January 19, 2007, at 09:34AM, "Christiaan Hofman" > <cmh...@gm...> wrote: >> On 1/19/07, Adam R. Maxwell <ama...@ma...> wrote: >>> >> >> And now the -objectAtIndex: range exception. > > Yeah. I've looked at all the places we use objectAtIndex: and > don't see anything obvious. I was hoping it was that pasteboard > crasher, but it looks like a consistent range problem instead of a > failure to respond. > I also checked those, without any luck. The problem is that it is very common operation. It can easily be called indirectly, possibly somewhere in a framework. If only we could reduce it to some task. >> >> BTW, for the application launch exception, could we save that file as >>> a BDAlias instead of a URL? That should be more reliable. >>> >>> -- adam >> >> >> We could, but what about backward compatibility? > > Something like > > id obj; > if((obj = [defaults objectForKey:NewFileKeyWithAlias])) > fileURL = [[BDAlias aliasWithData:obj] fileURL]; > else if((obj = [defaults objectForKey:OldFileStringKey])){ > fileURL = [NSURL fileURLWithPath:obj]; //or whatever it is > BDAlias *alias = [BDAlias aliasWithFileURL:fileURL]; > [defaults setObject:alias forKey:NewFileKeyWithAlias]; > } > > Kind of a pain, but not too many lines of code, if we introduce a > new key. That's a possiblity. We could also fix it in BibAppController. Christiaan |