• 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
Re: poseAsClassing???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: poseAsClassing???
  • Next by Date: Re: poseAsClassing???
  • Previous by thread: Re: NSTextField delegate textDidChange:
  • Next by thread: Working with HTML in NSAttributedString
  • Index(es):
    • Date
    • Thread