• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
poseAsClassing???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • NSTextField delegate textDidChange:
      • From: Richard Adams <email@hidden>
    • Re: poseAsClassing???
      • From: John Hörnkvist <email@hidden>
    • Re: poseAsClassing???
      • From: "Erik M. Buck" <email@hidden>
  • Prev by Date: Re: Handling keydown events
  • Next by Date: Re: poseAsClassing???
  • Previous by thread: NSArchiver/NSUnarchiver + Java: Does this work?
  • Next by thread: Re: poseAsClassing???
  • Index(es):
    • Date
    • Thread