On Friday, January 18, 2008, at 10:45AM, "Christiaan Hofman" <[EMAIL 
PROTECTED]> wrote:
>
>
>On 18 Jan 2008, at 7:39 PM, Adam R. Maxwell wrote:
>
>> Another question: why not create a BDSKFileSearchResult per  
>> identifier instead of passing the set to a BDSKFileSearchResult?   
>> Or are the search result objects no longer used for display?
>>
>
>The search looks into and returns file URLs rather than  
>identifierURLs. And there is no 1-to-1 correspondence. Any file URL  
>(and therefore search result) can correspond to multiple pubs, and a  
>pub can appear for multiple file URLs (results).

Right, but I'm still confused.  How are they displayed?  There used to be a 1:1 
correspondence between rows in the table and BDSKSearchResult instances.  How 
are the multiple pubs displayed in the table?

In BDSKFileSearch there is this:

            NSURL *theURL = (NSURL *)SKDocumentCopyURL(skDocument);
            NSSet *identifierURLs = [searchIndex 
allIdentifierURLsForURL:theURL];
            NSString *title = nil;
            NSEnumerator *idURLEnum = [identifierURLs objectEnumerator];
            NSURL *idURL;
            while (title == nil && (idURL = [idURLEnum nextObject]))
                title = [[self delegate] search:self 
titleForIdentifierURL:idURL];
            
            searchResult = [[BDSKFileSearchResult alloc] initWithURL:theURL 
identifierURLs:identifierURLs title:(NSString *)title score:score];            
            [searchResults addObject:searchResult];            
            [searchResult release];
            [theURL release];

Based on previous recollection of the architecture it would make sense to do

for (identifier in identifierURLs) {
   searchResult = [[BDSKFileSearchResult alloc] initWithURL:theURL 
identifierURL:identifierURL title:(NSString *)title score:score];
   [searchResults addObject:searchResult];
   [searchResult release];
}

I haven't followed all the changes in enough detail, so maybe this isn't 
possible.

>> On Friday, January 18, 2008, at 10:22AM, "Adam R. Maxwell"  
>> <[EMAIL PROTECTED]> wrote:
>>> So did the latest changes to file search get any testing before  
>>> checkin?  I had an immediate crash (fixed), but now the search  
>>> result initializer is crashing with an assertion failure of (nil ! 
>>> = aSet).  Not sure what's going on there...
>
>No, I did not test. Sorry for that. But after your changes I tested  
>and it now works. Thanks.

It still wasn't working for me after those changes, so I was going slightly 
crazy...but then I realized the file format had changed.  Now I can use it :).

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to