• 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: Binding NSArrayController to program
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding NSArrayController to program


  • Subject: Re: Binding NSArrayController to program
  • From: Hans van der Meer <email@hidden>
  • Date: Tue, 12 Feb 2008 13:05:33 +0100


On 11 feb 2008, at 13:27, Hank Heijink wrote:

You did bind the array to the Model Key Path of the Content Array, right?

That's it! I did bind to the "Editable" section and not to the "Content Array" section.
Now it works, iff I also use the KVC methods for setting and changing the bound variable.


One more question. I get quite confused by all the possibilities in the bindings section in Interface Builder. The bindings guide gives only a few examples. I could could not find a full description of the meaning of all the subpanels. Possibly there is. Can someone point me to it? Thanks.


That should work, and you shouldn't have to reach directly into the controller to add/remove objects. Is there anything special about how you add objects directly to your solutions array?

Hank

On Feb 11, 2008, at 6:21 AM, Hans van der Meer wrote:

There is something I must misunderstand. The goal is to have an object in the program reacting on some action from the gui by calculating new rows for a tableview.

The calculating object has a property:
@property(copy) NSMutableArray *solutions;
which is given in IB to the NSArrayController as Model Key Path.
However, adding objects to this solutions variable does nothing in the tableview coupled to the arraycontroller.


Things change when I give the added objects not to solutions but add them with:
[solutionsController addObject:...]
The solutionsController being an IBOutlet coupled to the arraycontroller. Now the objects added are becoming visible in the table and can be found with [solutionsController arrangedObjects]. But the solutions variable itself stays unaffected by the additions in spite of the apparent binding to solutions.


I must conclude that the arraycontroller manages its own version of the array, but what then is the solutions variable doing? I cannot remove it or the program stops functioning. And what if I would like to do the change on the solutions variable and propagate it to the table instead of directly reaching into the arraycontroller?

I must admit being quite confused here.

Hans van der Meer



Hank Heijink email@hidden



Hans van der Meer




_______________________________________________

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: Binding NSArrayController to program
      • From: Hank Heijink <email@hidden>
References: 
 >Binding NSArrayController to program (From: Hans van der Meer <email@hidden>)
 >Re: Binding NSArrayController to program (From: Hank Heijink <email@hidden>)

  • Prev by Date: My FetchRequest is not aware of changes I made
  • Next by Date: Re: Objective-C++
  • Previous by thread: Re: Binding NSArrayController to program
  • Next by thread: Re: Binding NSArrayController to program
  • Index(es):
    • Date
    • Thread