also, NSEnumerator *keyE = [[super tagDict] keyEnumerator]; //HERE it is not a good strategy to use NSEnumerator at this point
what if super does not respond at all ?? ..... to avoid crash & infinite loop you needs to specify 'forward messaging' ( another instance object that will respond to tadDict ), so your code will be weird again with if ( if ( if ( NSEnumerator will be better to count the number of 'plist' file exist in a bundle to prepare the quantity of dictionnary. Le 12 févr. 2011 à 16:19, Jerry Krinock a écrit : > First of all, I agree with claw that this line looks really weird, although > it might work. I've just never seen it done that way. > >> if ([self class] == [SuperClass class]) { > > Second, are you sure that SubClass inherits from SuperClass? Is it declared > like this? … > > @interface SubClass : SuperClass > > Finally, although this is not your current problem, the following line > violates Cocoa Memory Management conventions: >> return [dict copy]; > > Read this: > http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/MemoryMgmt/MemoryMgmt.html > >> I see that it appears to be calling [SubClass tagDict] which is the very >> method it's already in (so the selector can't very well be unrecognized, or >> what?) > > No, if it did that it would be a recursive method, and possibly an infinite > loop. > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/clawfr59%40yahoo.fr > > This email sent to clawf...@yahoo.fr _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com