[MacRuby-devel] NSNotificationCenter observers, selectors and notifications

Thibault Martin-Lagardette thibault.ml at gmail.com
Sat Apr 24 13:32:52 PDT 2010


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100424/8acc3583/attachment.html>


More information about the MacRuby-devel mailing list