poseAsClassing???
poseAsClassing???
- Subject: poseAsClassing???
- From: Ondra Cada <email@hidden>
- Date: Sat, 24 Nov 2001 23:25:06 +0100
Hello,
I've just encountered a strangle problem: I am loading a bundle inside any
application using the Input Management (just like, say, Mike's TextExtras).
Inside the bundle I poseAsClass:NSApplication to improve sendEvent: somehow.
The code's plain:
@implementation MyApp:NSApplication
-(void)sendEvent:(NSEvent*)evt {
if (...) ...;
[super sendEvent];
}
+(void)load {
[self poseAsClass:[self superclass]];
}
@end
What's strange: in some applications (like Grab) it works like a charm. In
others (like TextEdit) it does not! The [NSApplication run] just keeps
calling the overridden [NSApplication sendEvent:]. The poseAsClass: worked
though -- if I check in gdb the [NSApplication sharedApplication], I'll truly
get "%NSapplication", just like if I try [NSApplication superclass]...
Well, I'm out of ideas completely :((( What's even more intriguing: if I add
the code _directly_ to my project, it works right!
Any advice? TIA!
---
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