ruby - webview

Petr Sigut plasma at sigut.net
Sat Oct 3 18:41:24 CEST 2009


Hi all!

I am trying to make simple Plasma Ruby Web Applet, i followed this outdated 
tutorial:

http://techbase.kde.org/Development/Tutorials/Plasma/RubyApplet

and modified it, but I am unable to use url method, the method is undefined

web = Plasma::WebView.new()
web.url = Qt::Url.new("http://dot.kde.org/")

`method_missing': undefined method `url=' for #<Plasma::WebView:0xa8e99d98 
objectName=""> (NoMethodError)

This "works":

web = Qt::WebView.new()
web.load(Qt::Url.new("http://www.google.com"))

but I can't see any result because I am unable to add it to the layout

layout = Qt::GraphicsLinearLayout.new Qt::Horizontal, self
layout.add_item web

RubyWidget::Main
/usr/share/kde4/apps/plasma_scriptengine_ruby/applet.rb:1047:in 
`method_missing': undefined method `addItem' for 
#<Qt::GraphicsLinearLayout:0xa8e8bd4c> (NoMethodError)

I've installed all libraries which seems to have something common with QT and 
Ruby and plasma:) 

I am sorry if I've overlooked something, but the documentation for ruby which 
I found was very poor...

Thank you very much,

Peter



More information about the Plasma-devel mailing list