[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

wx ruby notify window?

Christian Kerth

12/7/2007 10:37:00 AM

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
--
Posted via http://www.ruby-....

5 Answers

Alex Fenton

12/7/2007 11:05:00 AM

0

Christian Kerth 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--t48...

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.co...
http://rubyforge.org/pipermail/wxr...

alex




MonkeeSage

12/8/2007 7:36:00 AM

0

On Dec 7, 5:04 am, Alex Fenton <af...@deleteme.cam.ac.uk> wrote:
> Christian Kerth 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-messag......
>
> 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:
http://www.venraiker.com/wp-content/uploads/2006/03/libno...

References:
http://www.galago-project.org/news...
http://trac.galago-project.org/wiki/No...
http://ruby-libnotify.ruby...

> 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/wxr...
>
> alex

Regards,
Jordan

John Joyce

12/15/2007 10:27:00 PM

0


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

> Christian Kerth 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-...
> 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.co...
> http://rubyforge.org/pipermail/wxr...
>
> 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

Luis Lavena

12/15/2007 10:36:00 PM

0

On Dec 7, 7:37 am, Christian Kerth <christian.ke...@dynamicmedia.at>
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/...

And ruby-snarl:
http://code.google.com/p/r...

HTH,

Luis

hengist podd

12/16/2007 6:01:00 PM

0

On 15 Dec, 22:27, John Joyce <dangerwillrobinsondan...@gmail.com>
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/...

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/r...


> 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
--
http://appscript.sourc...
http://rb-appscript.rub...