• 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: Scenarios I don't know how to use Bindings in
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scenarios I don't know how to use Bindings in


  • Subject: Re: Scenarios I don't know how to use Bindings in
  • From: "I. Savant" <email@hidden>
  • Date: Sat, 10 Feb 2007 00:47:08 -0500

Seth:

1) The first thing is managing the enabled state of a Remove button for a list. Every bindings tutorial has one, and not a single tutorial demonstrates how this should be done! Do I still need to use a table delegate, or can I actually bind the enabled port (what's the right name for this?) of the button to the array controller's selection? I've tried that, and it never works.

The right name is its "binding". Bind the button's enabled binding to the array controller's canRemove controller key (with no model key path). This will properly manage the state versus selection.


2) Currently I have a FileTypesManager object which manages an array (and some other structures) of FileType objects. The glue code in my preferences controller displays the file types in a table view, and then allows them to be edited. Before adding a new file type, I first display a sheet to get some critical values from the user. When deleting, there's also a confirmation sheet. So how can I do the same thing with bindings?

You might have to give more details here. The sheets should work exactly the same ... you may be thinking that you have to connect a button to the controller's add: action ... but nothing says you can't connect your "Add" button to your own method (to display the sheet, etc.) and send -add: to your array controller when you want to. You can even call -addObject: and hand it a ready-made object.

If that's not the answer to the question you asked, maybe others will understand where I didn't ... but it would still help to give more details. :-)

--
I.S.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Scenarios I don't know how to use Bindings in
      • From: Seth Willits <email@hidden>
References: 
 >Scenarios I don't know how to use Bindings in (From: Seth Willits <email@hidden>)

  • Prev by Date: Scenarios I don't know how to use Bindings in
  • Next by Date: Re: Scenarios I don't know how to use Bindings in
  • Previous by thread: Scenarios I don't know how to use Bindings in
  • Next by thread: Re: Scenarios I don't know how to use Bindings in
  • Index(es):
    • Date
    • Thread