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 wrote:

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



On Apr 24, 2010, at 03:41, Jakub Suder wrote:

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-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel