MacOSX/Framework/VLCMediaPlayer.m: Use the newer form of trigger key for key changes.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 2 Jan 2008 18:34:43 +0000 (18:34 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 2 Jan 2008 18:34:43 +0000 (18:34 +0000)
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m

index 5417142..e6fa7aa 100644 (file)
@@ -124,6 +124,11 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
 
 @implementation VLCMediaPlayer
 
+/* Bindings */
++ (id)keysPathsForValuesAffectingPlaying { return [NSSet setWithObject:@"state"]; }
++ (id)keysPathsForValuesAffectingSeekable { return [NSSet setWithObjects:@"state", @"media"]; }
+
+/* Contructor */
 - (id)init
 {
     return [self initWithDrawable:nil];
@@ -536,8 +541,6 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
 {
     if (self = [super init])
     {
-        [VLCMediaPlayer setKeys:[NSArray arrayWithObject:@"state"] triggerChangeNotificationsForDependentKey:@"playing"];
-        [VLCMediaPlayer setKeys:[NSArray arrayWithObjects:@"state", @"media", nil] triggerChangeNotificationsForDependentKey:@"seekable"];
         delegate = nil;
         media = nil;
         cachedTime = [[VLCTime nullTime] retain];