• 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
Sent Actions, Delegates, Outlets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sent Actions, Delegates, Outlets


  • Subject: Sent Actions, Delegates, Outlets
  • From: "Oleg Krupnov" <email@hidden>
  • Date: Thu, 24 Jul 2008 08:34:42 +0300

I'm building a custom view

1) What is the recommended way of raising external "events" (at least
that's what they were called in C#) from within a custom view, in
order to trigger actions in other objects that may be observing the
view? I assume it is to use a delegate outlet, right?

However I noticed that not all views use delegates to trigger external
actions. For example, NSButton don't seem to have a delegate, but they
have the "Sent Actions" section in the menu that appears on Ctrl+click
in the IB, that is initially empty ("selector"), but filled with sent
actions, as I connect the button to other objects. I am confused about
what exact button's event is supposed to trigger those "sent actions"?
Isn't it that even a button can have multiple events, e.g. click,
mouse dragged, mouse roll over etc.? Or is there a "default" event,
like "click", that is used for the sent action?

2) I have found that IB automatically treats all member variables of
my custom view's class that are of type "id" or "id<...>" as outlets,
i.e. they appear in the list of outlets on Ctrl+click. This is not
always desirable. How do I prevent some of those variables from being
treated like outlets?

Thanks!
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Sent Actions, Delegates, Outlets
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Is checking -count worth it?
  • Next by Date: Re: Sent Actions, Delegates, Outlets
  • Previous by thread: Re: Help on Menu Item
  • Next by thread: Re: Sent Actions, Delegates, Outlets
  • Index(es):
    • Date
    • Thread