mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
* GormCore/GormClassManager.m: Allow addClassNamed:... to accept
arguments superClass, actions, and outlets as nil. * GormObjCHeaderParser/OCClass.m: Correctly recognize a category in [OCClass parse]; Corrects bug#17804. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@23660 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d5e5de02c9
commit
bc0a78c47a
3 changed files with 23 additions and 9 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-09-28 22:27-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormClassManager.m: Allow addClassNamed:... to accept
|
||||
arguments superClass, actions, and outlets as nil.
|
||||
* GormObjCHeaderParser/OCClass.m: Correctly recognize a category
|
||||
in [OCClass parse]; Corrects bug#17804.
|
||||
|
||||
2006-09-28 20:38-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* English.lproj/GormDocument.gorm: Added search field and drop down
|
||||
|
|
|
@ -269,9 +269,9 @@
|
|||
{
|
||||
BOOL result = NO;
|
||||
NSString *classNameCopy = [NSString stringWithString: className];
|
||||
NSString *superClassNameCopy = [NSString stringWithString: superClassName];
|
||||
NSMutableArray *actionsCopy = [NSMutableArray arrayWithArray: actions];
|
||||
NSMutableArray *outletsCopy = [NSMutableArray arrayWithArray: outlets];
|
||||
NSString *superClassNameCopy = (superClassName != nil)?[NSString stringWithString: superClassName]:nil;
|
||||
NSMutableArray *actionsCopy = (actions != nil)?[NSMutableArray arrayWithArray: actions]:[NSMutableArray array];
|
||||
NSMutableArray *outletsCopy = (outlets != nil)?[NSMutableArray arrayWithArray: outlets]:[NSMutableArray array];
|
||||
|
||||
// We make an autoreleased copy of all of the inputs. This prevents changes
|
||||
// to the original objects from reflecting here. GJC
|
||||
|
@ -299,7 +299,10 @@
|
|||
|
||||
[classInfo setObject: outletsCopy forKey: @"Outlets"];
|
||||
[classInfo setObject: actionsCopy forKey: @"Actions"];
|
||||
[classInfo setObject: superClassNameCopy forKey: @"Super"];
|
||||
if(superClassNameCopy != nil)
|
||||
{
|
||||
[classInfo setObject: superClassNameCopy forKey: @"Super"];
|
||||
}
|
||||
[classInformation setObject: classInfo forKey: classNameCopy];
|
||||
|
||||
// if it's a custom class add it to the list.
|
||||
|
@ -1878,9 +1881,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
if([self isKnownClass: superClass] &&
|
||||
[cls isCategory] == NO &&
|
||||
superClass != nil)
|
||||
if(([self isKnownClass: superClass] || superClass == nil) &&
|
||||
[cls isCategory] == NO)
|
||||
{
|
||||
if([self isKnownClass: className])
|
||||
{
|
||||
|
@ -1908,7 +1910,7 @@
|
|||
{
|
||||
[self addActions: actions forClassNamed: className];
|
||||
}
|
||||
else if(superClass != nil)
|
||||
else if(superClass != nil && [self isKnownClass: superClass] == NO)
|
||||
{
|
||||
result = NO;
|
||||
[NSException raise: NSGenericException
|
||||
|
|
|
@ -180,7 +180,12 @@
|
|||
[iscan scanUpToCharactersFromSet: wsnl intoString: &cn];
|
||||
className = [cn stringByTrimmingCharactersInSet: wsnl];
|
||||
RETAIN(className);
|
||||
isCategory = YES;
|
||||
|
||||
// check to see if it's a category on an existing interface...
|
||||
if(lookAhead(interfaceLine,@"("))
|
||||
{
|
||||
isCategory = YES;
|
||||
}
|
||||
}
|
||||
|
||||
if(isCategory == NO)
|
||||
|
|
Loading…
Reference in a new issue