• 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: Detail view beginner question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detail view beginner question


  • Subject: Re: Detail view beginner question
  • From: Yann Bizeul <email@hidden>
  • Date: Thu, 17 Jun 2004 14:23:01 +0200

> Now the question is: Is it better to have a second controller class
> for that window (in the future i will have two or three slightly
> different objects in the table and want to adapt the info-window
> accordantly ) and how I connect the text fields in the info window
> with my tableview.

If you need different windows for each kind of information you show in
the TableView, and depending how often and when you would need these
windows, perhaps I would choose to have a nib for each item type.
The nib owner would be a NSWindowController subclass, responsible of
getting current objet and display/update it's infos.

Now how to get the current object ? I'm asking assistance of more
skilled OOP people, bacause myself will hesistate between different,
more or less clean, solutions (Be indulgent, I'm reading a book on
Design Patterns !) :

- Have CurrentObjectController singleton shared for the whole
application
- Subclass NSApplication and add a -(id)currentObject method
- add an initialization method to your NSWindowController subclass like
this :
- (NSWindowController*)initWithWindowNibName:(NSString*)aName
object:(MyObject*)anObject
...


--
Yann Bizeul - yann at tynsoe.org
http://projects.tynsoe.org/
_______________________________________________
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: Detail view beginner question
      • From: Stéphane Sudre <email@hidden>
References: 
 >Detail view beginner question (From: email@hidden (Norbert Pfaff))

  • Prev by Date: Re: Properly dealing with images
  • Next by Date: Re: Scrolling List of Thumbnails?
  • Previous by thread: Detail view beginner question
  • Next by thread: Re: Detail view beginner question
  • Index(es):
    • Date
    • Thread