Hmm, I think my original mail never got through, so here's a re-sent:
On 2006-05-05 20:53:53 +0200 "Vaisburd, Haim" <[EMAIL PROTECTED]>
wrote:
Is there any way to call the original method
within the implementation of my override,
in this case the original [NSBitmapImageRep-destroy] ?
Try something like
static IMP originalDestroy;
@implementation NSBitmapImageRep (MyCategory)
+ (void) initialize
{
Method_t destroy;
static BOOL isInitialized = NO;
[super initialize];
if( isInitialized) return;
destroy = class_get_instance_method([NSBitmapImageRep class],
@selector(destroy));
originalDestroy = destroy->method_imp;
isInitialized = YES;
}
void OriginalDestroy(id object)
{
if( object) originalDestroy(object, @selector(destroy));
}
- (void) destroy
{
OriginalDestroy(self);
}
@end
I do that to replace -description to provide some more information,
but I'm still able to use the original -description, which I use to
store in a dictionary.
--
Chris
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep