Monotone-Parent: d2e66141062b6a54f72d1984d7fdc67b55880949

Monotone-Revision: f057a34e782a5a8e8f44135b338e66f79e7e6c24

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-11-01T22:36:03
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-11-01 22:36:03 +00:00
parent b4381db6ac
commit ffec79c166
2 changed files with 25 additions and 16 deletions

View File

@@ -72,26 +72,29 @@ static NGCardsSaxHandler *sax = nil;
NSEnumerator *cards;
CardGroup *currentCard;
cardParser = [self cardParser];
[sax setTopElementClass: [self class]];
cardGroups = nil;
if (parser)
if (source)
{
cardGroups = [NSMutableArray new];
[cardGroups autorelease];
[parser parseFromSource: source];
cards = [[sax cards] objectEnumerator];
cardParser = [self cardParser];
[sax setTopElementClass: [self class]];
currentCard = [cards nextObject];
while (currentCard)
{
[cardGroups addObject: currentCard];
currentCard = [cards nextObject];
}
if (parser)
{
cardGroups = [NSMutableArray new];
[cardGroups autorelease];
[parser parseFromSource: source];
cards = [[sax cards] objectEnumerator];
currentCard = [cards nextObject];
while (currentCard)
{
[cardGroups addObject: currentCard];
currentCard = [cards nextObject];
}
}
}
else
cardGroups = nil;
return cardGroups;
}

View File

@@ -1,3 +1,9 @@
2007-11-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* CardGroup.m ([CardGroup +parseFromSource:source]): make sure the
given source is not nil, otherwise the parser will raise an
exception, which we don't want.
2007-10-29 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* CardElement.m ([CardElement -value:anInt]): added handling for