Added category handling.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20720 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-02-15 04:29:32 +00:00
parent f016e032d8
commit 1b3157f3d6
2 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2005-02-14 23:35 Gregory John Casamento <greg_casamento@yahoo.com>
* GormClassManager.m: changed [GormClassManager parseHeader:]
to be able to properly handle categories on existing classes.
2005-02-14 01:00 Gregory John Casamento <greg_casamento@yahoo.com>
* GormObjCHeaderParser/OCIVarDecl.m: Corrected problem with

View file

@ -1638,9 +1638,6 @@
NSMutableArray *outlets = [NSMutableArray array];
// skip it, if it's category... for now. TODO: make categories work...
if([cls isCategory])
continue;
while((method = (OCMethod *)[men nextObject]) != nil)
{
if([method isAction])
@ -1657,7 +1654,9 @@
}
}
if([self isKnownClass: superClass])
if([self isKnownClass: superClass] &&
[cls isCategory] == NO &&
superClass != nil)
{
if([self isKnownClass: className])
{
@ -1681,7 +1680,11 @@
withOutlets: outlets];
}
}
else
else if([cls isCategory] && [self isKnownClass: className])
{
[self addActions: actions forClassNamed: className];
}
else if(superClass != nil)
{
result = NO;
[NSException raise: NSGenericException