• 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: how to get the iTunes look
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get the iTunes look


  • Subject: Re: how to get the iTunes look
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Fri, 5 Nov 2004 02:22:47 +0100

At 15:01 Uhr -0800 04.11.2004, Robert Chien wrote:
Can someone point me to a documentation or sample code for how to implement the "Source column" view in iTunes and iPhoto? I don't mean the brushed metal look, but drawing the column which displays playlist and albums, and how a tune or photo can belong in multiple playlist or albums.

The GUI portion of that is done using NSTableView or NSOutlineView. If you want the gradient look on the selection, somebody posted some iTableView sample code a while ago (It was Matt: http://www.iratescotsman.com).


The algorithmic part is really done the same way it would be done in any programming language. A good book on design patterns will probably include a few patterns for that. Basically, you'll just maintain a master list (the term 'list' should always ring the 'NSArray' bell) and then separate lists with some sort of references to entries in the master list for the playlists.

Cocoa's retain/release reference-counting-based memory model makes that pretty easy, you just have to remove your objects from all lists they're in when they're removed from the master list.

Or you can make the master list an NSDictionary, and just keep the keys in the other lists. That way they'll get NIL when trying to look up a deleted object. Both solutions have their messy aspects.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >how to get the iTunes look (From: Robert Chien <email@hidden>)

  • Prev by Date: Re: why no autosave for NSSplitView?
  • Next by Date: Re: using JBuilder to code Cocoa-Java. It is possible ?
  • Previous by thread: Re: how to get the iTunes look
  • Next by thread: Why not a procedure for retain/release?
  • Index(es):
    • Date
    • Thread