• 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: Should I be trying to use bindings for this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should I be trying to use bindings for this?


  • Subject: Re: Should I be trying to use bindings for this?
  • From: Scott Andrew <email@hidden>
  • Date: Wed, 3 Oct 2007 13:01:30 -0700

You could create a 2nd array controller and have its arranged objects attached to your 1st array controller's selected item at a key path of "weapons". This allows you too dynamically associate a 2nd controller for a another list box based on the selection of another. This should work well really well. Then its all dynamic and you have very little code except for basic accessors. Doing an addObject on the 2nd controller will add your new weapons to the backing NSMutableArray.

Scott

On Oct 3, 2007, at 11:18 AM, Paul Bruneau wrote:

On Oct 3, 2007, at 1:19 PM, I. Savant wrote:

 Okay, so if you ask for its orderSteps using -valueForKey: or
-valueForKeyPath: you should get what you're looking for (ie, no
proxy). You can ask the proxy for any KVC-compliant property and
you'll get real objects in response. I'm not sure based on your
description if this is sufficient for your purposes, but it's worth
mentioning.

 Caveat: I may totally be misunderstanding your description. Take the
above with a grain of salt.

I think you lost me there. I don't care if the array controller is a proxy, but I want the objects in it to be the real ones.


Let me reference something all of us can look at. If you can, run mmalc's combatants example. See how you can choose the weapon for an attacker? Now pretend that each attacker can have an array of weapons instead of just one, chosen from a list of weapons he can buy.

How, using bindings, might I set up the interface to let the user edit the list of weapons in an attacker's possession?

I want the attacker to have an instance variable array containing the weapons, and I want the array to contain pointers to the actual weapon objects.

I hope that clarifies what I am looking to do.

_______________________________________________

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

_______________________________________________

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: Should I be trying to use bindings for this?
      • From: Paul Bruneau <email@hidden>
References: 
 >Should I be trying to use bindings for this? (From: Paul Bruneau <email@hidden>)
 >Re: Should I be trying to use bindings for this? (From: "I. Savant" <email@hidden>)
 >Re: Should I be trying to use bindings for this? (From: Paul Bruneau <email@hidden>)
 >Re: Should I be trying to use bindings for this? (From: "I. Savant" <email@hidden>)
 >Re: Should I be trying to use bindings for this? (From: Paul Bruneau <email@hidden>)

  • Prev by Date: Re: SCNetworkConnection - Dictionary/Subdictionary
  • Next by Date: Re: SCNetworkConnection - Dictionary/Subdictionary
  • Previous by thread: Re: Should I be trying to use bindings for this?
  • Next by thread: Re: Should I be trying to use bindings for this?
  • Index(es):
    • Date
    • Thread