• 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: passing messages to parent controls?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passing messages to parent controls?


  • Subject: Re: passing messages to parent controls?
  • From: Matt Neuburg <email@hidden>
  • Date: Thu, 27 Jan 2005 07:39:01 -0800

On Thu, 27 Jan 2005 19:35:01 +1100, Duncan Campbell
<email@hidden> said:
>Hi folks,
>
>I'm building my own tabs to mimic the way that safari tabs work (with
>the nice mouse-over effects etc).
>
>Each tab is an NSView subclass with an image on it for the "close"
>button. I then have a wrapper class that creates the tab-bar that each
>tab sits on (basically an array of tab items). Each tab item has 2
>events - 1 for the tab select click, and 1 for the close-button click.
>
>My question is: Since these events take place in the tab item class
>itself, how do i send them back to the tab-bar class so that it can be
>notified that a tab has been clicked (or closed) and take the
>appropriate action (select the tab, or close the tab/remove from
>array).

They are your classes, so it is your job to provide each tab item with a
pointer to the tab-bar at the time that the tab item is created as a
"member" of that tab-bar. m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>



 _______________________________________________
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: passing messages to parent controls?
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: Conversion from object to NSString
  • Next by Date: May I pack java in a dylib?
  • Previous by thread: passing messages to parent controls?
  • Next by thread: Re: passing messages to parent controls?
  • Index(es):
    • Date
    • Thread