• 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 to a model class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding to a model class


  • Subject: Re: Binding to a model class
  • From: mmalcolm crawford <email@hidden>
  • Date: Fri, 30 Apr 2004 15:00:32 -0700

On Apr 30, 2004, at 12:42 PM, Don Rainwater wrote:

If I define myArray and it's methods (myArray, setMyArray, insertObject:inMyArrayAtIndex, removeObjectFromMyArrayAtIndex) in the document class, it works. But I like the idea of setting it up in a separate model class. Do I need to implement the insert... and remove... methods in MyDocument instead of MyModel, or am I missing something else?

Assuming an instance variable 'myModel' in your document class, bind the content of your array controller to:
[File's Owner].myModel.myArray

The MyModel class should implement suitable accessor methods for 'myModel'.

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.


References: 
 >Binding to a model class (From: Don Rainwater <email@hidden>)

  • Prev by Date: Sliding an image
  • Next by Date: Re: Binding to a model class
  • Previous by thread: Binding to a model class
  • Next by thread: Re: Binding to a model class
  • Index(es):
    • Date
    • Thread