• 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: <no subject>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <no subject>


  • Subject: Re: <no subject>
  • From: Dietrich Epp <email@hidden>
  • Date: Sun, 6 Oct 2002 02:16:41 -0700

On Saturday, October 5, 2002, at 11:42 , Tony S. Wu wrote:

I have a document-based application, which is also a data source of a table
view.
But I have another data source of another table view which hosts completely
different jobs.
However, this data source needs access from the document class.
So I have this line in the data source for the information I need:

NSMutableArray anArray = [(MyDocument *)[[NSDocumentController
sharedDocumentController] currentDocument] arrayINeed];

But it produces a weird problem when you open a document with another old
document existing.
Cause the currentDocument: will return the old existing document instead of
the new one that's being opened.
Can anyone tell me how to fix this??
Thanks a lot.

Don't do it that way. Link the data source to the document itself, not by calling currentDocument.
_______________________________________________
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: 
 ><no subject> (From: "Tony S. Wu" <email@hidden>)

  • Prev by Date: Re: [Q] Assertion failure in -[NSThemeFrame lockFocus]
  • Next by Date: Re: relaunch Finder...
  • Previous by thread: <no subject>
  • Next by thread: Removing all paragraph settings from a textview
  • Index(es):
    • Date
    • Thread