Response from binding of NSPopUpButton
Response from binding of NSPopUpButton
- Subject: Response from binding of NSPopUpButton
- From: Audun Frøysaa <email@hidden>
- Date: Wed, 20 Feb 2008 19:22:28 +0100
Hello everybody.
I have just started Cocoa and are not very familiar with any other
programing language exept php.
Luckily i have some great resource at this mailing list.
As you maybe understand i am totally new to Cocoa and need some
starter project that i really want to work on to get started.
I have started a project to get itunes playlist in a NSPopUpButton and
all the tracks in a TableView or OutlineView.
I found all the code on the idevgames site written by Shamyl Zakariya.
Its a great code that reads the iTunes Music Library.xml.
I have managed to get all the playlists in the NSPopUpButton, but i do
not get anything in the TableView.
I am using bindings to get my data but i think i'm missing something.
In interface builder i have a ArrayObject and in the Object Controller
i have iTunes as class and keys playlists, tracksForPlaylist.
i then connected playlist to the content of the NSPopUpButton
modelKeyPath to playlist and selection as controller key.
It works and every playlist shows in the popupbutton.
When i change the playlist nothing happens.
The TableView is connected to the tracksForPlaylist in its value field.
Can someone help me?
@interface : NSObject {
NSDictionary *iTunesDatabase;
}
-(NSArray *) playlists;
- (NSArray *) tracksForPlaylist: (NSString *) playlist;
- (NSArray *) musicURLSForPlaylist: (NSString *) playlist;
@end
The .m file:
-(NSArray *) playlists{
<code>
return playlistNames;
}
- (NSArray *) tracksForPlaylist: (NSString *) playlistName
{
<code>
return tracks;
}
- (NSArray *) musicURLSForPlaylist: (NSString *) playlist{
<code>
return files;
}
Thanks
_______________________________________________
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