cocoa - When an NSWindow object has a delegate that is a NSWindow subclass, who is responsible to act on received events? -
That's why I am creating a program that shows the use of IKIMImagebrowser VV components as a subview in an NSWindow is. As a side note, I have a controller object named ImageBreasure Controller that is a NSWWO subclass and is set as a representative of the NSWWDOV object of my app I have sent the message to IKImageBrowserCanControlClickPanel: Yes, the IEEEJZRbrowser is the first responder to receive the events of VEE, then this is the image of the image files Rwavlokn is automatically able to use Quick Look functionality. Then I was briefly figuring out how to get the first responder to create the IKImbrowser which was finally overridden by the Ephter Reporter I was accepted into my ImageBrowserController . Now I think that the reps on the NSWindow, the Respondent of the ImageBrowserController is in place, when the event will start on NSWindo. And I think that as a subview of NSWW, IKEmusebrowser is the line to pass events for event handling. What I do not get is, where the connection is between the ImageBreaker Controller , the first responder and the event is somehow making it in the IKIMM Browser wwe. I did not explicitly set up NSWindow or IKImageBrowserView as the first respondents. So why is not I necessary to implement event handling inside my ImageBrowserController ? Edit: After reading and returning the accepted reply, my code will be sent to the first responder override I accept in my ImageBrowserController Tried to delete and the QuickLook functionality was still triggered, as the acceptable answer said that it would be commented out of SetCanControlQuickLookPanel: Yes, when I tried to try the QuickLook functionality via the spacebar, yes, the app beep Created. I am feeling that my problem was due to the change of my code ( sigh ), due to the user error of XCode to kill the run button rather than the build button. What do you understand about interactions between your objects, nothing, and It is difficult to solve your question without any background. As you say, there is a place on the end of the respondent chain near your window rep, I think that the main point you are missing is that Your GUI elements like When your app receives an event, it sends it to the key window (which is the only window that currently accepts "key" (i.e., "keystrokes") events). It starts by asking its This means that the connection between the window rep and the Your window rep does not need to be a Your window rep too (and, of course, should not ) be a sub-class of Then, finally, answer your clear question (and I mean it is not sarcastic): You only need to implement event handling in your window delegates if you want to manage the event itself . *: IKImageBrowserView will be on the beginning of the series, and one of them may be in the given window that the current
first resconder .
first responder to handle the window event, if the object denies it, then it passes through its own
nextResponder , usually its Supervised, which either handles it or passes it, unless the event is either reached or passed in all the way, the object itself will only be the window (if it does not keep the incident in its own hands) So eve To handle Ask her representative.
IKImageBrowserView is only through it, and its nature is only that if there is a decrease in handling any event. , Then the representative can finally be asked to handle it, if any other object previously handles it among them .
first protector .
NSWindow . This requirement is only to be a sub-class of
NSObject , which is interested in whatever methods you apply, and the way to handle any such event that they are controlled by other objects. Are not done.
IKImageBrowserView already accepts
yes to firstResponder . If there is no other subviews in your window, then it will be automatically
first responder , when your application starts. You can connect this outlet to whatever window you want in this
initialFirstResponder clearly in the interface builder window.
Comments
Post a Comment