# Wx ruby notify window?

**URL:** <https://www.ruby-forum.com/t/wx-ruby-notify-window/122409>\
**Category:** Ruby\
**Created:** [December 7, 2007, 11:37am UTC](https://www.ruby-forum.com/t/wx-ruby-notify-window/122409 "2007-12-07T11:37:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sealedsun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Post date:** [December 7, 2007, 11:37am UTC](https://www.ruby-forum.com/t/wx-ruby-notify-window/122409/1 "2007-12-07T11:37:22Z")

</div>

Hey I want to create a growl like notification system for a ruby  
application. I’m using the wxruby toolkit.

Is there a component that allows such a behavior (display text, not  
shown in taskbar…). I had a look at the splash screen component, but  
that one isn’t able to display text.

Any ideas? thx

---

<div class="post-metadata">

**Author:** ![sealedsun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Post date:** [December 7, 2007, 12:06pm UTC](https://www.ruby-forum.com/t/wx-ruby-notify-window/122409/2 "2007-12-07T12:06:16Z")

</div>

Christian K. wrote:

> Hey I want to create a growl like notification system for a ruby  
> application. I’m using the wxruby toolkit.
> 
> Is there a component that allows such a behavior (display text, not  
> shown in taskbar…). I had a look at the splash screen component, but  
> that one isn’t able to display text.

There’s nothing quite like this in wxRuby at the moment, because there’s  
no cross-platform way at the moment to do it in the underlying toolkit.  
It’s under discussion:

[http://www.nabble.com/API-for-transient-notification-messages--t4832586.html](http://www.nabble.com/API-for-transient-notification-messages--t4832586.html)

I guess you could use Win32API to do it on Windows, but AFAIK there is  
no “native” way to do this on OS X, hence growl as an add-on. Perhaps  
Growl could be scripted via Ruby-Cocoa.

I’d be interested to know if any of the other major toolkits support  
this: QT or GTK.

PS - these questions are better asked on the wxruby-users mailing list,  
where more people will see them:

[http://www.ruby-forum.com/forum/36](http://www.ruby-forum.com/forum/36)  
[http://rubyforge.org/pipermail/wxruby-users/](http://rubyforge.org/pipermail/wxruby-users/)

alex

---

<div class="post-metadata">

**Author:** ![sealedsun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Post date:** [December 8, 2007, 8:42am UTC](https://www.ruby-forum.com/t/wx-ruby-notify-window/122409/3 "2007-12-08T08:42:11Z")

</div>

On Dec 7, 5:04 am, Alex F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> It’s under discussion:
> 
> [http://www.nabble.com/API-for-transient-notification-messages--t48325](http://www.nabble.com/API-for-transient-notification-messages--t48325)…
> 
> I guess you could use Win32API to do it on Windows, but AFAIK there is  
> no “native” way to do this on OS X, hence growl as an add-on. Perhaps  
> Growl could be scripted via Ruby-Cocoa.
> 
> I’d be interested to know if any of the other major toolkits support  
> this: QT or GTK.

Don’t know about QT, but there’s libnotify (GTK-based lib) for linux.  
Haven’t played with the ruby bindings much.

Obligatory screenshot:

> **[DuckDuckGo — Privacy, simplified.](https://duckduckgo.com/)**
>
> The Internet privacy company that empowers you to seamlessly take control of your personal information online, without any tradeoffs.

References:  
[http://www.galago-project.org/news/index.php](http://www.galago-project.org/news/index.php)  
[http://trac.galago-project.org/wiki/NotifyWindow](http://trac.galago-project.org/wiki/NotifyWindow)  
[http://ruby-libnotify.rubyforge.org/](http://ruby-libnotify.rubyforge.org/)

> PS - these questions are better asked on the wxruby-users mailing list,  
> where more people will see them:
> 
> [http://www.ruby-forum.com/forum/36http://rubyforge.org/pipermail/wxruby-users/](http://www.ruby-forum.com/forum/36http://rubyforge.org/pipermail/wxruby-users/)
> 
> alex

Regards,  
Jordan

---

<div class="post-metadata">

**Author:** ![sealedsun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Post date:** [December 15, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/wx-ruby-notify-window/122409/4 "2007-12-15T23:40:39Z")

</div>

On Dec 7, 7:37 am, Christian K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hey I want to create a growl like notification system for a ruby  
> application. I’m using the wxruby toolkit.
> 
> Is there a component that allows such a behavior (display text, not  
> shown in taskbar…). I had a look at the splash screen component, but  
> that one isn’t able to display text.
> 
> Any ideas? thx

There is a ruby-growl and ruby-snarl implementations:

Snarl for Windows:  
[http://www.fullphat.net/snarl.html](http://www.fullphat.net/snarl.html)

And ruby-snarl:  
[http://code.google.com/p/ruby-snarl/](http://code.google.com/p/ruby-snarl/)

HTH,

Luis

---

<div class="post-metadata">

**Author:** ![sealedsun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Post date:** [December 15, 2007, 11:28pm UTC](https://www.ruby-forum.com/t/wx-ruby-notify-window/122409/5 "2007-12-15T23:28:55Z")

</div>

On Dec 7, 2007, at 5:05 AM, Alex F. wrote:

> underlying toolkit. It’s under discussion:
> 
> PS - these questions are better asked on the wxruby-users mailing  
> list, where more people will see them:
> 
> [http://www.ruby-forum.com/forum/36](http://www.ruby-forum.com/forum/36)  
> [http://rubyforge.org/pipermail/wxruby-users/](http://rubyforge.org/pipermail/wxruby-users/)
> 
> alex

on OS X growl does use native APIs!  
Cocoa does have this stuff available. It’s just a PITA to dig through  
the cocoa docs.  
that means, however, you can access it with RubyCocoa… maybe even  
appscript-rb or rubyosa

---

<div class="post-metadata">

**Author:** ![sealedsun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Post date:** [December 16, 2007, 7:13pm UTC](https://www.ruby-forum.com/t/wx-ruby-notify-window/122409/6 "2007-12-16T19:13:35Z")

</div>

On 15 Dec, 22:27, John J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> on OS X growl does use native APIs!  
> Cocoa does have this stuff available. It’s just a PITA to dig through  
> the cocoa docs.

Assuming that the OP is wanting to trigger user notifications from  
their wx app as opposed to writing a Growl-clone in wx (I wasn’t sure  
from their post), using existing native notifier systems such as Growl  
seems the reasonable way to go.

Growl developer docs are here:

[http://growl.info/documentation/developer/](http://growl.info/documentation/developer/)

It sounds like a Ruby binding is included, although it’s not something  
I’ve any experience with myself.

A quick Google also turns up the following, which appears to let you  
trigger Growl from Ruby scripts running on non-Macs.

[http://segment7.net/projects/ruby/growl/](http://segment7.net/projects/ruby/growl/)

> that means, however, you can access it with RubyCocoa… maybe even appscript-rb or rubyosa

IIRC, RubyOSA barfs on GrowlHelperApp’s dictionary (it’s a bit finicky  
that way). Rb-appscript or (if you don’t want the additional  
dependency) embedded AppleScripts executed via `osascript ...` should  
work okay though. (Can’t recall if you can also trigger it directly  
from the command line or not.) No idea though if this would have any  
advantages over using Growl’s existing Ruby bindings or not.

HTH

has
