Is there any way to force/cajole/encourage Interface Builder into running the C preprocessor when scanning source files for IBOutlet references?
It's a tricky problem, I can see, since in an ideal world it would need to preprocess the file with the same context that the project would, ie with the precompiled headers etc (this is much more likely to work when IB is integrated into XCode I would guess).
I have some property-related macro trickery that I want to do.
Leaving aside the reason for the macros in the first place (since it's not particularly relevant to this question, other than providing a motivation), my big stumbling block is that IB is pretty simplistic in the way that it recognises outlets. If I use my macros, I can't persuade IB to spot outlets.
For example if I wanted to replace:
@property (retain, nonatomic) IBOutlet UIWindow* window;
with my macros, it would look something like this:
ECPropertyDefine(window, UIWindow*, retain, nonatomic);
Unfortunately, it's obvious that by default IB doesn't perform any macro expansion, and thus has no clue that this is an outlet, regardless of whether I put IBOutlet into the macro definition, or into the parameters that I call the macro with.
I was just wondering whether there might be some obscure hook somewhere in IB which would allow a script to preprocess the source files as IB scans them.