• 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: Removed view still getting events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removed view still getting events


  • Subject: Re: Removed view still getting events
  • From: John Nairn <email@hidden>
  • Date: Thu, 28 Sep 2006 13:54:17 -0700

On Sep 28, 2006, at 1:41 PM, j o a r wrote:


On 28 sep 2006, at 22.28, John Nairn wrote:

Is there a proper way to remove a view and stop it from getting events? Maybe it is subview of something else too?

I don't think that's possible.

What is it that triggers you to remove the view? Are you doing it in the middle of some mouse event, or from something not related to user input events in the window?

j o a r

I have a window controller for graphics output of scientific calculations. There is a scroll view and a view for the graphics. When the scroll view awakes from the nib, it sets the graphics view to its document view.


I am extending my software now to do 3D calculations. I want to reuse most of the current window controller and just replace the scroll view and graphics view by a new scroll view with an NSOpenGLView subclass as its document view. It works, but the original graphics view continues to get events. If I remove that view, those events cause a crash. If I retain it before removing it, I can see the events reaching that object. It would be better to have the view removed from the responder chain because those events will not make sense to the planned 3D output.

All this changes are done when the window first opens (in windowDidLoad). It opens fine but a crash occurs when the mouse is moved.

I thought of making a separate nib file for the 3D view, but the previous nib file has a lot of other elements (e.g. drawers, dialog boxes, tool bar elements, etc.) that should be the same and I want to reuse them as is.

---------------
John Nairn (1-541-737-4265, FAX:1-541-737-3385)
Professor and Richardson Chair
Web Page: http://woodscience.oregonstate.edu/faculty/Nairn
FEA/MPM Web Page: http://oregonstate.edu/~nairnj



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Removed view still getting events (From: John Nairn <email@hidden>)
 >Re: Removed view still getting events (From: j o a r <email@hidden>)

  • Prev by Date: Change selected Text using changeAttributes:
  • Next by Date: Re: Re: How to check if NSTextField is selected?
  • Previous by thread: Re: Removed view still getting events
  • Next by thread: Re: Removed view still getting events
  • Index(es):
    • Date
    • Thread