Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
[ANN]GrowlNotifier 1.0.1
Satoshi Nakagawa
8/20/2008 9:56:00 AM
Growl Notifier 1.0.1 has been released.
http://rubyforge.org/projects/grow...
http://growlnotifier.ruby...
Growl Notifier allows your application to post Growl notifications.
It can then receive clicked and timed out notifications from Growl.
Or you can give it a block, which will then be used as a clicked callback.
It is an extraction and clean up of the Growl code from LimeChat.
The option to pass procs is extracted from WebApp.
LimeChat:
http://github.com/psychs/limechat/t...
WebApp:
http://github.com/alloy/webapp-app/t...
== Installation
gem install growlnotifier
== Requirements
* Mac OS X 10.4 or 10.5
* Ruby 1.8
* RubyCocoa 0.13.1
== Example
require 'rubygems'
require 'growl'
class GrowlController < OSX::NSObject
HELLO_TYPE = 'Hello message received'
def init
if super_init
@g = Growl::Notifier.sharedInstance
@g.delegate = self
@g.register('GrowlSample', [HELLO_TYPE])
@g.notify(HELLO_TYPE, 'Sticky', 'Hello world',
:sticky => true, :click_context => Time.now.to_s )
@g.notify(HELLO_TYPE, 'Timed out', 'Hello world',
:click_context => Time.now.to_s )
@count = 2
self
end
end
def growlNotifierClicked_context(sender, context)
puts "Clicked: #{context}"
checkCount
end
def growlNotifierTimedOut_context(sender, context)
puts "Timed out: #{context}"
checkCount
end
def checkCount
@count -= 1
OSX::NSApp.terminate(nil) if @count == 0
end
end
g = GrowlController.alloc.init
OSX::NSApp.run
--
Satoshi Nakagawa
2 Answers
Tim Pease
8/20/2008 6:21:00 PM
0
On Aug 20, 2008, at 3:55 AM, Satoshi Nakagawa wrote:
> Growl Notifier 1.0.1 has been released.
>
>
http://rubyforge.org/projects/grow...
>
http://growlnotifier.ruby...
>
> Growl Notifier allows your application to post Growl notifications.
> It can then receive clicked and timed out notifications from Growl.
> Or you can give it a block, which will then be used as a clicked
> callback.
>
> It is an extraction and clean up of the Growl code from LimeChat.
> The option to pass procs is extracted from WebApp.
How does this compare to meow ?
http://rubyforge.org/pro...
Blessings,
TwP
Eloy Duran
8/21/2008 6:18:00 AM
0
> How does this compare to meow ?
>
>
http://rubyforge.org/pro...
Hi Tim,
At some point we decided we wanted to extract this code as a separate
lib and gem.
During this process we discovered the Meow lib. But after studying the
source, at that point in time, we decided to go ahead anyway. Because
our code was more mature and with better test coverage etc.
We have however not compared them at this point in time, so if you do
please let us know :)
Cheers,
Eloy
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
[ANN]GrowlNotifier 1.0.1
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password