mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
Move createCustomClassRecordForId:... to parent class
This commit is contained in:
parent
33fea1762d
commit
39bd359505
3 changed files with 29 additions and 18 deletions
|
@ -45,16 +45,27 @@
|
|||
}
|
||||
|
||||
+ (BOOL) checkXib5: (NSData *)data;
|
||||
|
||||
+ (NSKeyedUnarchiver *) unarchiverForReadingWithData: (NSData *)data;
|
||||
|
||||
- (void) _initCommon;
|
||||
|
||||
- (id) decodeObjectForXib: (GSXibElement*)element
|
||||
forClassName: (NSString*)classname
|
||||
withID: (NSString*)objID;
|
||||
|
||||
- (id) _decodeArrayOfObjectsForElement: (GSXibElement*)element;
|
||||
|
||||
- (id) _decodeDictionaryOfObjectsForElement: (GSXibElement*)element;
|
||||
|
||||
- (id) objectForXib: (GSXibElement*)element;
|
||||
|
||||
- (void) createCustomClassRecordForId: (NSString *)theId
|
||||
withParentClass: (NSString *)parentClassName
|
||||
forCustomClass: (NSString *)customClassName;
|
||||
|
||||
- (NSArray *) customClasses;
|
||||
|
||||
- (NSDictionary *) decoded;
|
||||
|
||||
@end
|
||||
|
|
|
@ -765,21 +765,6 @@ static NSArray *XmlBoolDefaultYes = nil;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) createCustomClassRecordForId: (NSString *)theId
|
||||
withParentClass: (NSString *)parentClassName
|
||||
forCustomClass: (NSString *)customClassName
|
||||
{
|
||||
if (theId == nil || customClassName == nil)
|
||||
return;
|
||||
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||
theId, @"id",
|
||||
parentClassName, @"parentClassName",
|
||||
customClassName, @"customClassName",nil];
|
||||
[_customClasses addObject: dict];
|
||||
// NSLog(@"theId = %@, parentClassName = %@, customClassName = %@", theId, parentClassName, customClassName);
|
||||
}
|
||||
|
||||
- (void) parser: (NSXMLParser*)parser
|
||||
didStartElement: (NSString*)elementName
|
||||
namespaceURI: (NSString*)namespaceURI
|
||||
|
|
|
@ -198,9 +198,10 @@
|
|||
{
|
||||
NSXMLElement *refNode = [refNodes objectAtIndex: 0];
|
||||
NSString *refId = [refNode stringValue];
|
||||
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
refId, @"id", sc, @"parentClassName", cn, @"customClassName", nil];
|
||||
[_customClasses addObject: dict];
|
||||
|
||||
[self createCustomClassRecordForId: refId
|
||||
withParentClass: sc
|
||||
forCustomClass: cn];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1111,4 +1112,18 @@ didStartElement: (NSString*)elementName
|
|||
return _customClasses;
|
||||
}
|
||||
|
||||
- (void) createCustomClassRecordForId: (NSString *)theId
|
||||
withParentClass: (NSString *)parentClassName
|
||||
forCustomClass: (NSString *)customClassName
|
||||
{
|
||||
if (theId == nil || customClassName == nil)
|
||||
return;
|
||||
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||
theId, @"id",
|
||||
parentClassName, @"parentClassName",
|
||||
customClassName, @"customClassName",nil];
|
||||
[_customClasses addObject: dict];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue