[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: ruby bindings
From:       Richard Dale <richard.j.dale () gmail ! com>
Date:       2009-01-19 18:17:23
Message-ID: 491684420901191017g52c5befdha690e60368a89c70 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Fri, Jan 9, 2009 at 6:28 AM, 0xDeadC0de <roguestar191@comcast.net> wrote:

> I think there's a coincidence between the animator and the
> tooltipmanager singletons not working. If I uncomment everything in the
> snippet below it crashes on me. at
> ToolTipManager::self().setContent(icon, data).
>  (I am using older bindings from 4.2b2 still..)
>
> Someone in irc suggested it could be the "self" keyword conflicting with
> the c++ function call, could this be it? (Sorry if I remembered who I'd
> give them credit)

No that works fine - I think this is the same problem with Singletons that
has just been fixed.

-- Richard


>
>
>    def addToolNoLayout(iconString)
>        icon = Plasma::IconWidget.new(@top.mytop)
>        action = Qt::Action.new(KDE::Icon.new(iconString), "",
> @top.mytop)
>        action.setToolTip("test")
>        icon.setAction(action)
>        icon.setMinimumSize(32,32)
>        icon.setMaximumSize(32,32)
> #
> icon.setPreferredSize(icon.sizeFromIconSize(KDE::IconLoader::Toolbar))
> #       puts 'create data'
> #       data = Plasma::ToolTipContent.new()
> #       data.mainText = ("My Title")
> #       data.subText = ("This is a little tooltip")
> #       puts 'add to manager'
> #       Plasma::ToolTipManager::self().setContent(icon, data)
> #       puts 'end'
>
>        return icon
>    end
>
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">On Fri, Jan 9, 2009 at 6:28 AM, 0xDeadC0de <span \
dir="ltr">&lt;<a href="mailto:roguestar191@comcast.net">roguestar191@comcast.net</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> I think there&#39;s a \
coincidence between the animator and the<br> tooltipmanager singletons not working. \
If I uncomment everything in the<br> snippet below it crashes on me. at<br>
ToolTipManager::self().setContent(icon, data).<br>
&nbsp;(I am using older bindings from 4.2b2 still..)<br>
<br>
Someone in irc suggested it could be the &quot;self&quot; keyword conflicting \
with<br> the c++ function call, could this be it? (Sorry if I remembered who \
I&#39;d<br> give them credit)</blockquote><div>No that works fine - I think this is \
the same problem with Singletons that has just been fixed.<br><br>-- \
Richard<br>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px \
solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br>
<br>
 &nbsp; &nbsp;def addToolNoLayout(iconString)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;icon = Plasma::IconWidget.new(@top.mytop)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;action = Qt::Action.new(KDE::Icon.new(iconString), \
&quot;&quot;,<br> @top.mytop)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;action.setToolTip(&quot;test&quot;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;icon.setAction(action)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;icon.setMinimumSize(32,32)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;icon.setMaximumSize(32,32)<br>
#<br>
icon.setPreferredSize(icon.sizeFromIconSize(KDE::IconLoader::Toolbar))<br>
# &nbsp; &nbsp; &nbsp; puts &#39;create data&#39;<br>
# &nbsp; &nbsp; &nbsp; data = Plasma::ToolTipContent.new()<br>
# &nbsp; &nbsp; &nbsp; data.mainText = (&quot;My Title&quot;)<br>
# &nbsp; &nbsp; &nbsp; data.subText = (&quot;This is a little tooltip&quot;)<br>
# &nbsp; &nbsp; &nbsp; puts &#39;add to manager&#39;<br>
# &nbsp; &nbsp; &nbsp; Plasma::ToolTipManager::self().setContent(icon, data)<br>
# &nbsp; &nbsp; &nbsp; puts &#39;end&#39;<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;return icon<br>
 &nbsp; &nbsp;end<br>
<br>
<br>
_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> \
</blockquote></div><br>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic