FROM : Jerrod Fowkes
DATE : Tue Aug 15 21:55:33 2006
Hello,
I have created a class that inherits off of NSView. It does some special things that I need it to do. We will call this viewB. I have another Custom view that I created in IB. We will call this viewA. When viewA gets created, I manually create a bunch of viewB's. So far I have been able to get each of them to draw individually.
Basically I am creating a grid that I want each square to handle it's own event. I already create an array of each of the pointers to the viewB's in memory so that I can access them. So far, the viewB class has it's own mouseDown event and it overrides acceptsFirstResponder. This doesn't seem to be good enough since viewB gets created dynamically a bunch of times. So then I discovered that since it's being created dynamically, it needs to somehow respond to the NSResponder chain. Also, I discovered that in order for each individual viewB to get close to the event, viewA must accepts events, --->At least that is what the NSResponder architecture is telling me. So,,
I need the ability to bypass viewA and somehow subscribe each viewB to the "main" responder chain. This means that I don't want to accept mouse events (I can to some degree) and then determine where the user clicked and then grab a handle to the instance of that viewB and send the event to that. Any help would be appreciated. -Jerrod Fowkes
---------------------------------
Stay in the know. Pulse on the new Yahoo.com. Check it out.
DATE : Tue Aug 15 21:55:33 2006
Hello,
I have created a class that inherits off of NSView. It does some special things that I need it to do. We will call this viewB. I have another Custom view that I created in IB. We will call this viewA. When viewA gets created, I manually create a bunch of viewB's. So far I have been able to get each of them to draw individually.
Basically I am creating a grid that I want each square to handle it's own event. I already create an array of each of the pointers to the viewB's in memory so that I can access them. So far, the viewB class has it's own mouseDown event and it overrides acceptsFirstResponder. This doesn't seem to be good enough since viewB gets created dynamically a bunch of times. So then I discovered that since it's being created dynamically, it needs to somehow respond to the NSResponder chain. Also, I discovered that in order for each individual viewB to get close to the event, viewA must accepts events, --->At least that is what the NSResponder architecture is telling me. So,,
I need the ability to bypass viewA and somehow subscribe each viewB to the "main" responder chain. This means that I don't want to accept mouse events (I can to some degree) and then determine where the user clicked and then grab a handle to the instance of that viewB and send the event to that. Any help would be appreciated. -Jerrod Fowkes
---------------------------------
Stay in the know. Pulse on the new Yahoo.com. Check it out.
| Related mails | Author | Date |
|---|---|---|
| Jerrod Fowkes | Aug 15, 21:55 | |
| I. Savant | Aug 15, 23:19 | |
| Erik Buck | Aug 16, 01:44 | |
| Jerrod Fowkes | Aug 16, 14:58 | |
| I. Savant | Aug 16, 15:01 | |
| Jerrod Fowkes | Aug 16, 16:17 | |
| Uli Kusterer | Aug 16, 17:44 |






Cocoa mail archive

