From: Adam M. <ama...@us...> - 2005-02-27 18:18:36
|
Update of /cvsroot/bibdesk/bibdesk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8366 Modified Files: BibAppController.m BibDocument.m Log Message: Remove incorrect NSLog from previous commit, attempt to do some further error checking in service code, since we seem to get a fair number of crashes from it. Index: BibAppController.m =================================================================== RCS file: /cvsroot/bibdesk/bibdesk/BibAppController.m,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** BibAppController.m 27 Feb 2005 17:37:50 -0000 1.82 --- BibAppController.m 27 Feb 2005 18:18:26 -0000 1.83 *************** *** 848,852 **** } [scanner scanCharactersFromSet:ampersandSet intoString:nil]; // scan the ampersands away. ! [searchConstraints setObject:queryString forKey:queryKey]; if(![scanner isAtEnd]) // do i have to do this? [scanner scanCharactersFromSet:[NSCharacterSet alphanumericCharacterSet] intoString:&queryKey];// scan another --- 848,853 ---- } [scanner scanCharactersFromSet:ampersandSet intoString:nil]; // scan the ampersands away. ! if(queryKey) ! [searchConstraints setObject:queryString forKey:queryKey]; if(![scanner isAtEnd]) // do i have to do this? [scanner scanCharactersFromSet:[NSCharacterSet alphanumericCharacterSet] intoString:&queryKey];// scan another *************** *** 856,860 **** // if it was at end, we are done, and we'll scan in the title: // items = [_finder itemsMatchingText:queryKey inKey:BDSKTitleString]; ! [searchConstraints setObject:queryKey forKey:BDSKTitleString]; } --- 857,865 ---- // if it was at end, we are done, and we'll scan in the title: // items = [_finder itemsMatchingText:queryKey inKey:BDSKTitleString]; ! if(queryKey){ ! [searchConstraints setObject:queryKey forKey:BDSKTitleString]; ! } else { ! searchConstraints = nil; ! } } *************** *** 894,897 **** --- 899,908 ---- NSDictionary *searchConstraints = [self _constraintsFromString:pboardString]; + if(searchConstraints == nil){ + *error = NSLocalizedString(@"Error: invalid search constraints.", + @"search constraints not valid."); + return; + } + items = [_finder itemsMatchingConstraints:searchConstraints]; Index: BibDocument.m =================================================================== RCS file: /cvsroot/bibdesk/bibdesk/BibDocument.m,v retrieving revision 1.193 retrieving revision 1.194 diff -C2 -d -r1.193 -r1.194 *** BibDocument.m 27 Feb 2005 17:37:50 -0000 1.193 --- BibDocument.m 27 Feb 2005 18:18:26 -0000 1.194 *************** *** 2672,2676 **** - (void)setTableFont{ - // NSLog(@"[%@ %@]", NSStringFromSelector(_cmd)); // The font we're using now NSFont *font = [NSFont fontWithName:[[OFPreferenceWrapper sharedPreferenceWrapper] objectForKey:BDSKTableViewFontKey] --- 2672,2675 ---- |