gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about objc category


From: Ivan Vučica
Subject: Re: Question about objc category
Date: Wed, 1 May 2013 11:58:13 +0200

Without looking at the code, I wonder if it could it be a global variable 
instead of an ivar.

Regards,

Ivan Vučica
via phone

On 1. 5. 2013., at 11:53, address@hidden wrote:

> Hi,
> 
> 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 :
> 
> //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 ?
> 
> Thanks
> 
> 
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnustep-dev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]