Re: poseAsClassing???
Re: poseAsClassing???
- Subject: Re: poseAsClassing???
- From: Ondra Cada <email@hidden>
- Date: Sun, 25 Nov 2001 00:06:04 +0100
Well, it's couriouser and couriouser: it seems that if an application uses
its own application class (even a completely empty one!!!), it does work. If
it uses plain NSApplication, it does not.
Wow. Still I have't a clue what the real problem might be, and how to solve it...
>
>>>>> Ondra Cada (OC) wrote at Sat, 24 Nov 2001 23:25:06 +0100:
OC> @implementation MyApp:NSApplication
OC> -(void)sendEvent:(NSEvent*)evt {
OC> if (...) ...;
OC> [super sendEvent];
OC> }
OC> +(void)load {
OC> [self poseAsClass:[self superclass]];
OC> }
OC> @end
OC>
OC> What's strange: in some applications (like Grab) it works like a charm.
OC> In others (like TextEdit) it does not! The [NSApplication run] just keeps
OC> calling the overridden [NSApplication sendEvent:]. The poseAsClass:
OC> worked though -- if I check in gdb the [NSApplication sharedApplication],
OC> I'll truly get "%NSapplication", just like if I try [NSApplication
OC> superclass]...
OC>
OC> Well, I'm out of ideas completely :((( What's even more intriguing: if I
OC> add the code _directly_ to my project, it works right!
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc