On 01.05.2013 11:53, [email protected] wrote:
I am reading the GNUstep source code and especially the parts that concern the loading of a Xib and I am currently looking at the following code :
Could you please explain why you think this code is in any way involved in the loading of XIB files? If it really is, we might have a problem in GNUstep gui. Thc code in the Model directory is not directly part of the GNUstep gui library in fact it was already been proposed to remove it completely from GNUstep gui. This code gets used to read and write GModel files, a very old way of transferring interface definitions between Next/Apple and GNUstep environments.
XIB loading gets handled by (hopefully) completely separate code.
//https://github.com/gnustep/gnustep-gui/blob/master/Model/IBClasses.h @interface NSCustomObject : NSObject { NSString *className; id realObject; id extension; } @end //https://github.com/gnustep/gnustep-gui/blob/master/Model/IBClasses.m @implementation NSCustomObject (NibToGModel) - (id)awakeAfterUsingCoder:(NSCoder*)aDecoder { #ifdef DEBUG NSLog (@"%x awakeAfterUsingCoder NSCustomObject: className = %@, realObject = %@, " @"extension = %@", self, className, realObject, extension); #endif [objects addObject:self]; return self; } What I don't understand is the line [objects addObject:self]; where does the ivar objects comes from ? Is it the objects variable from the GSXibKeyedUnarchiver ? In this case does it mean when you use a category you have access to the caller's context ?
To answer your specific question, objects in a global variable declared in Translator.h:
extern NSMutableArray* objects; _______________________________________________ Gnustep-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnustep-dev
