• 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: disabling click-through in transparent views (seeking comments)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disabling click-through in transparent views (seeking comments)


  • Subject: Re: disabling click-through in transparent views (seeking comments)
  • From: Josh Anon <email@hidden>
  • Date: Thu, 15 May 2003 08:45:39 -0700

I don't really have a comment, but could you elaborate a little on what you did in sendEvent of the window subclass? I did not understand the bit about the "child window".
Sure--a child window is a window attached to a parent window that moves with it and such, similar to a drawer, but the child window can be at a different level, in this case on top of the parent window (see NSWindow). It's good for an overlay window.

In this case, I first subclassed the parent window. sendEvent: now looks like this:

-(void)sendEvent:(NSEvent*)ev {
NSEnumerator *childEnum = [[self childWindows] objectEnumerator];
id w;
//we should only have 1 child
while (w = [childEnum nextObject]) {
[ev setWindow:w];
[w sendEvent:ev];
}

[super sendEvent:ev];
}

To support this, I also hacked a setWindow:/setWindowNumber: method into a NSEvent category (that's part of the reason I don't like this hack) to fool the child window into thinking it got this event in the first place. It works quite nicely in my case, but again, I don't think it's the ultimate right-way answer.

Hope that helps you!
Josh

--
Josh Anon
Studio Tools Intern, Pixar Animation Studios
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: disabling click-through in transparent views (seeking comments)
  • Next by Date: RE: NSPopUpButton failure after adding file names
  • Previous by thread: Re: disabling click-through in transparent views (seeking comments)
  • Next by thread: Setting BOTH single and double actions from an outline view
  • Index(es):
    • Date
    • Thread