• 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: Any reason to bind NSButtons?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any reason to bind NSButtons?


  • Subject: Re: Any reason to bind NSButtons?
  • From: "b.bum" <email@hidden>
  • Date: Sun, 16 May 2004 13:56:50 -0700

On May 16, 2004, at 1:10 PM, Peter Wollschlaeger wrote:
I'm convinced to use binding with table views and user defaults but is there any advantage to apply binding to buttons?
I'm wondering because non of the examples demonstrating binding use for buttons, but in that case just the conventional way.

For your basic target/action type stuff, using bindings vs. T/A makes little difference.

However, there are a number of situations where you can use Bindings where T/A would not work.

For example, target/action bindings allows you to execute just about any method on the target that you want, including passing arguments to the method. I have used this effectively to implement a single action method where the arguments are used to determine which objects should be affected by the action. In some cases, this has meant passing the selection of an array controller through as the argument to the action, thereby making the action operate upon the selected items in a table view without requiring any code to gather or track the selection manually.

b.bum
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Any reason to bind NSButtons? (From: Peter Wollschlaeger <email@hidden>)

  • Prev by Date: Re: Recuperating after NS_HANDLER
  • Next by Date: Views from a Bundle not becoming active
  • Previous by thread: Any reason to bind NSButtons?
  • Next by thread: Views from a Bundle not becoming active
  • Index(es):
    • Date
    • Thread