[MacRuby-devel] [MacRuby] #391: HotCocoa on_notification method stopped functioning in MacRuby 0.5 under Snow Leopard
MacRuby
ruby-noreply at macosforge.org
Sat Oct 17 03:33:57 PDT 2009
#391: HotCocoa on_notification method stopped functioning in MacRuby 0.5 under
Snow Leopard
--------------------------------------+-------------------------------------
Reporter: trevor@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords: HotCocoa on_notification
--------------------------------------+-------------------------------------
I have a small MacRuby/HotCocoa application that uses the on_notification
method described by Richard Kilmer in his post of Sept 19 2008
http://lists.macosforge.org/pipermail/macruby-
devel/2008-September/000539.html
This application worked well under MacRuby 0.4 and Mac OS 10.5. It
intercepts Spotify Growl messages to obtain track title and artist
information to pass into an AppleScript Studio via a small window that it
creates. The MacRuby/HotCocoa app was provided by a friendly software
developer, Peter MacRobert, for me since ASS did not have the appropriate
inter-process message handling capability. The script for the app is
attached.
I upgraded to Snow Leopard and discovered that the app crashed out with
MacRuby 0.4. I succeeded in downloading and installing MacRuby 0.5 and now
the app loads successfully with no error messages as before under Leopard.
Unfortunately the on_notification code does not get triggered any longer.
No error messages, just stubbornly refuses to respond when the Distributed
Notifications Center gets the Spotify message. I am able to see that the
message is there by firing up Growl which shows the message each time
Spotify plays a track.
Under Mac OS 10.5, it was necessary to have Growl stopped for this app to
be able to intercept the message coming out of Spotify destined for the
Growl alert.
I'm afraid I am not familiar with what is required to set up a test case.
All I can do is describe the situation. I believe that Spotify is now
available in the USA, it's a music streaming application (excellent btw,
if you're not familiar). When running a Spotify session every time a track
is launched it sends a message to the Distributed Notifications Center
containing the Track Artist & Title information, if the system has Growl
installed and configured for Spotify, a Growl alert will appear to the
configured spec in Growl. If my MacRuby script is running (and, under
10.5, Growl is turned off) it will intercept the Spotify message and show
the Artist and track name in the two text fields of the window that it
opens.
This may sound crazy to you and it would take a while to explain why I
have this application. Briefly, it's used by an Applescript Studio App
that I wrote (hobby only, not commercial) which controls Spotify and hides
the windows to play a "Beat the Intro" game for competing teams. The
MacRuby window is hidden and is used to pass the track details from
Spotify to the ASS application.
I'm sure that there would be a much easier way to test the HotCocoa
on_notification method than setting up a test with my script and using
Spotify. But I'm afraid I do not know how to do that.
Regards
Trevor Hills
--
Ticket URL: <http://www.macruby.org/trac/ticket/391>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list