• 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
SubViews and Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SubViews and Events


  • Subject: SubViews and Events
  • From: Jerrod Fowkes <email@hidden>
  • Date: Tue, 15 Aug 2006 12:55:33 -0700 (PDT)

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.
 _______________________________________________
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

  • Follow-Ups:
    • Re: SubViews and Events
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Applying a Drop Shadow to an NSView
  • Next by Date: Re: Applying a Drop Shadow to an NSView
  • Previous by thread: Re: Applying a Drop Shadow to an NSView
  • Next by thread: Re: SubViews and Events
  • Index(es):
    • Date
    • Thread