[Kde-bindings] [Bug 183696] Singleton classes (e.g. Plasma::ToolTipManager) do not work in ruby kde bindings
Richard Dale
rdale at foton.es
Tue Feb 10 11:52:54 UTC 2009
On Sunday 08 February 2009 15:48:53 Pino Toscano wrote:
> http://bugs.kde.org/show_bug.cgi?id=183696
>
>
> Pino Toscano pino kde org changed:
>
> What |Removed |Added
> ---------------------------------------------------------------------------
>- AssignedTo|unassigned-bugs at kde.org |kde-bindings at kde.org
> Component|general |general
> Product|kde |bindings
module PlasmaAppletMinimal
class Main < PlasmaScripting::Applet
def init
tool_tip = Plasma::ToolTipContent.new
tool_tip.main_text = 'Whatever...'
Plasma::ToolTipManager.self.set_content(self, tool_tip)
end
end
end
This is a separate problem from the singleton bug. It is because the ruby
scripting bindings need special casing so that you don't need to keep passing
'parent.applet_script.applet' as an argument and can use 'self' instead.
I fixed it for the 'setContent' in the trunk version of
kdebase/workspace/plasma/scriptengines/ruby/applet.rb a couple of days ago.
However, I haven't be special casing the lower/case underscore versions and so
I need to go though the methods that are special cased and and the lower case
variants. So for now you need to call 'setContent' instead of 'set_content'.
-- Richard
More information about the Kde-bindings
mailing list