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

Re: NSTableView questions


  • Subject: Re: NSTableView questions
  • From: "I. Savant" <email@hidden>
  • Date: Tue, 25 Sep 2007 13:49:28 -0400

> set up the data source array in the initialization of your controlling
> object.  so if you have AppController with an NSMutableArray property you
> would setup initialize / setup the data source array in AppControllers
> init.  i guess this assumes you have AppController instantiated in your nib
> file

 -init is probably not where you'd want to load data from a file and
force an update when the application finishes launching.

  1 - What if you want to throw a dialogue if there's a problem with the file?

  2 - What if the rest of the UI in the nib is not finished loading
when you ask it to update?

  3 - What if other startup logic requires that the data is loaded in
order to succeed?

  Consider using the -applicationDidFinishLaunching: delegate method
(easily found by searching the documentation for "application launch",
two words the OP used in his question). When this is called, you can
rest assured that your application is ... well ... finished launching
and that all the required parts are fully assembled and ready to go.

  From there you can (while checking for errors and handling them
appropriately) try to load the file, then trigger any dependent UI
updates. You can also make sure that, upon fatal error, you have the
chance to notify the user and terminate before anything else can be
done. All this is contained in one neat, easily-managed location.

--
I.S.
_______________________________________________

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: NSTableView questions
      • From: "I. Savant" <email@hidden>
References: 
 >NSTableView questions (From: Hrishikesh Muruk <email@hidden>)
 >Re: NSTableView questions (From: "Clint Shryock" <email@hidden>)

  • Prev by Date: Re: how to build finalcut-pro style gui apps?
  • Next by Date: Re: NSTableView questions
  • Previous by thread: Re: NSTableView questions
  • Next by thread: Re: NSTableView questions
  • Index(es):
    • Date
    • Thread