Re: Multiple Inheritence (Was: Is _objc_flush_caches_(Class) necessary to swizzle methods?)
Re: Multiple Inheritence (Was: Is _objc_flush_caches_(Class) necessary to swizzle methods?)
- Subject: Re: Multiple Inheritence (Was: Is _objc_flush_caches_(Class) necessary to swizzle methods?)
- From: DumberThanDanQuayle <email@hidden>
- Date: Sat, 25 Sep 2004 11:06:00 -0400
On Sep 25, 2004, at 10:36 AM, Ondra Cada wrote:
On 25.9.2004, at 5:32, DumberThanDanQuayle wrote:
The idea presented in the code snippet above, that is writing
individual method or whole protocol implementations in a separate
file and the using the C preprocessor "#include" directives to insert
that text into class definitions where need, seems to work very well
and has no serious drawbacks
Well, depends on what "serious" means. You get one code at multiple
places. If you put a breakpoint there, it would work for one class
only, not for the other ones.
Ondra, I just tested this technique in the debugger by setting a break
point and it actually works. The protocol method source is actually
displayed as a normal file, which frankly was beyond my original
expectations. But as you predicted it seems to work only for one
class. Why is this? Would setting a break point in normal code allow
me to "step" into the "#include" code for all the classes?
To change somewhat the behaviour in future without recompilation
(using techniques like poseAsClassing or categories) would be quite on
the ugly side.
Why would "#include" code be treated differently then normal code is
these cases? I would assume that the compilation warnings and debugger
functions would be more liimted with "#define," but that the Obj-C
runtime would treat "#define" code as normal code to the extent that
you are suggesting "#include" code would be handled differently. Can
you comment on the use of "#define" versus "#include" in a technique
like this?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden