• 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: Best data source for table view in document window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best data source for table view in document window


  • Subject: Re: Best data source for table view in document window
  • From: Alex Zavatone <email@hidden>
  • Date: Wed, 05 Sep 2012 08:45:13 -0400

I use a standalone singleton object in Matt Galloway style.  Never ran into the crash you're mentioning.

On Sep 5, 2012, at 8:39 AM, Jerry Krinock wrote:

> What is the best the data source for a table view in a document window?  The candidates are…
>
> (1)  Category of the document.  This is the way it is done in the WithoutBindings ("With and Without Bindings") Apple sample code.  But it seems like too much "view-ish" code in the data model, particularly when my document class is also used in a GUI-less command-line tool, which has no need for this code.
>
> (2)  Separate, standalone object.  Fancy housekeeping is needed to avoid retain cycles, and crashes in corner cases as the document window is closing.
>
> (3)  Category of the window controller.  Probably not a bad choice, except that my window controller for this multi-tabbed window is already huge.
>
> (4)  Category of the table view itself, assuming that it is subclassed.  Seems like a logical division.  No worrying about whether table view or its data source gets deallocced first.  Access the document via [[[self window] windowController] document].
>
> * * *
>
> I've used (2) but think I'm going to switch to (4).  Any important considerations I've overlooked?
>
> Thanks,
>
> Jerry
>
>
> _______________________________________________
>
> 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


References: 
 >Best data source for table view in document window (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Best data source for table view in document window
  • Next by Date: Re: Best data source for table view in document window
  • Previous by thread: Best data source for table view in document window
  • Next by thread: Re: Best data source for table view in document window
  • Index(es):
    • Date
    • Thread