[wxruby-users] Filling clipboard doesn't work

Niklas Baumstark lists at ruby-forum.com
Sun Jul 27 14:06:09 EDT 2008


Hello,

I ran into a bit of trouble with my first wxRuby application. I'm using
ruby 1.8.6 with wxRuby 1.9.7 on x86 Linux (Ubuntu). Didn't test any
other platform yet. In my application, I'm trying to access the
clipboard like this:

Wx::Clipboard.open do |clip|
   clip.set_data Wx::TextDataObject.new("TEST")
   clip.flush
end

This doesn't work. While running the app (after the execution of the
above code), the menu entry "Paste" is enabled in other applications,
but nothing is in the clipboard (at least nothing happens on pasting).
After quitting my application, the menu entry is disabled again and the
clipboard is empty.

How do I access the clip properly?

I still got another question: Is it possible to send key-messages to
other apps using wxWidgets?

Greeting,
Niklas Baumstark
-- 
Posted via http://www.ruby-forum.com/.


More information about the wxruby-users mailing list