Re: [MacRuby-devel] NSNotificationCenter observers, selectors and notifications

2010-04-24 Thread Laurent Sansonetti
Also, note that you can use a symbol too, which is more efficient (they are only created once): > NSNotificationCenter.defaultCenter.addObserver(self, selector: > :"track_finished:" name:QTMovieDidEndNotification, object:nil) Laurent On Apr 24, 2010, at 1:32 PM, Thibault Martin-Lagardette wrot

Re: [MacRuby-devel] NSNotificationCenter observers, selectors and notifications

2010-04-24 Thread Thibault Martin-Lagardette
I concur. The problem is that you call: NSNotificationCenter.defaultCenter.addObserver(self, selector: :track_finished, name:QTMovieDidEndNotification, object:nil) That means you tell the notification center to call "track_finished", not "track_finished:" :-) -- Thibault Martin-Lagardette

Re: [MacRuby-devel] NSNotificationCenter observers, selectors and notifications

2010-04-24 Thread Jakub Suder
Hi, In ObjC, a method 'foo' that has one argument is referenced as 'foo:' in such situations (with colon), not 'foo'. Try passing a string "track_finished_with_notifier:" to the notification center. Jakub Suder ___ MacRuby-devel mailing list MacRuby-dev

[MacRuby-devel] NSNotificationCenter observers, selectors and notifications

2010-04-24 Thread Allison Newman
Hi peoples, I'm not sure if I'm doing something wrong here, or if it's a bug. I'm trying to get a notification when a quicktime track finishes playing. The documentation for NSNotificationCenter says: notificationSelector Selector that specifies the message the receiver sends notificationObse