I tried out the fix you applied. Unfortunately, for the format string,
%Y %f{Journal}0 - %a10 %n1%e
the code now makes "{Journal" a required field. The following change
fixes it:
Index: BDSKFormatParser.m
===================================================================
--- BDSKFormatParser.m (revision 13399)
+++ BDSKFormatParser.m (working copy)
@@ -1133,12 +1133,12 @@
case 'c':
j = [formatString rangeOfString:@"}" options:0
range:NSMakeRange(i, l - i)].location;
if (j != NSNotFound && j > i + 1)
- [arr addObject:[formatString
substringWithRange:NSMakeRange(i + 1, j - i - 1)]];
+ [arr addObject:[formatString
substringWithRange:NSMakeRange(i + 2, j - i - 2)]];
break;
case 'i':
j = [formatString rangeOfString:@"}" options:0
range:NSMakeRange(i, l - i)].location;
if (j != NSNotFound && j > i + 1)
- [arr addObject:[@"Document: "
stringByAppendingString:[formatString substringWithRange:NSMakeRange(i
+ 1, j - i - 1)]]];
+ [arr addObject:[@"Document: "
stringByAppendingString:[formatString substringWithRange:NSMakeRange(i
+ 2, j - i - 2)]]];
break;
default:
break;
-Colin
On Jun 6, 2008, at 3:00, Christiaan Hofman wrote:
> Thanks Colin, I've fixed these.
>
> Christiaan
>
> On 6 Jun 2008, at 2:45 AM, Colin A. Smith wrote:
>
>> I found a small counting bug in [BDSKFormatParser
>> requiredFieldsForFormat:]. It causes fields in format strings
>> inserted
>> with %f or %c to produce required field names with a lagging "}".
>>
>> Cheers.
>>
>> -Colin
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bibdesk-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop