• 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: NSArrayController and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController and bindings


  • Subject: Re: NSArrayController and bindings
  • From: mmalcolm crawford <email@hidden>
  • Date: Tue, 24 Feb 2004 14:47:12 -0800

On Feb 24, 2004, at 1:51 PM, Bjoern Kriews wrote:

Don't subclass Cocoa objects if you don't have to - it easier to use another object:
Subclass NSObject

Umm, NSObject is a "Cocoa object"...

into SomeController, add an outlet "arrayController" and an action "save:", instantiate it in your nib
and connect the outlet to your ArrayController, create the source files for SomeController and
add
[[arrayController content] writeToFile:@"/tmp/some.plist" atomically:YES];
to the save: method.
(content returns the array the controller is managing

It is possibly more likely that SomeController has an array instance variable to which the array controller's content is bound. SomeController is likely also to manage other objects. Any 'save:' method would probably therefore either simply archive SomeController's array variable directly (as opposed to asking the arrayController for its content), or create an archive of all the relevant data and model objects.

mmalc
_______________________________________________
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.


  • Follow-Ups:
    • Re: NSArrayController and bindings
      • From: Bjoern Kriews <email@hidden>
References: 
 >NSArrayController and bindings (From: Rob Borsuk <email@hidden>)
 >Re: NSArrayController and bindings (From: mmalcolm crawford <email@hidden>)
 >Re: NSArrayController and bindings (From: Rob Borsuk <email@hidden>)
 >Re: NSArrayController and bindings (From: Bjoern Kriews <email@hidden>)

  • Prev by Date: Weird retain Issue
  • Next by Date: Re: Weird retain Issue
  • Previous by thread: Re: NSArrayController and bindings
  • Next by thread: Re: NSArrayController and bindings
  • Index(es):
    • Date
    • Thread