<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[help claims that guideline.selected exists but does not]]></title><description><![CDATA[<p dir="auto">I know that this is probably not a way how to get active guideline, but the help says it is.</p>
<pre><code class="language-python">g = CurrentGlyph()
for guideline in g.guidelines:
    help(guideline)
    #print(guideline.selected)
    break
</code></pre>
<pre><code class="language-console"> |  Data descriptors inherited from fontParts.base.base.SelectionMixin:
 |  
 |  selected
 |      The object's selection state.
 |      
 |          &gt;&gt;&gt; obj.selected
 |          False
 |          &gt;&gt;&gt; obj.selected = True
</code></pre>
]]></description><link>https://forum.robofont.com/topic/835/help-claims-that-guideline-selected-exists-but-does-not</link><generator>RSS for Node</generator><lastBuildDate>Sun, 14 Jun 2026 09:50:47 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/835.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Apr 2020 00:27:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to help claims that guideline.selected exists but does not on Fri, 10 Apr 2020 10:11:13 GMT]]></title><description><![CDATA[<p dir="auto">I know that this is probably not a way how to get active guideline, but the help says it is.</p>
<pre><code class="language-python">g = CurrentGlyph()
for guideline in g.guidelines:
    help(guideline)
    #print(guideline.selected)
    break
</code></pre>
<pre><code class="language-console"> |  Data descriptors inherited from fontParts.base.base.SelectionMixin:
 |  
 |  selected
 |      The object's selection state.
 |      
 |          &gt;&gt;&gt; obj.selected
 |          False
 |          &gt;&gt;&gt; obj.selected = True
</code></pre>
]]></description><link>https://forum.robofont.com/post/3177</link><guid isPermaLink="true">https://forum.robofont.com/post/3177</guid><dc:creator><![CDATA[jansindl3r]]></dc:creator><pubDate>Fri, 10 Apr 2020 10:11:13 GMT</pubDate></item><item><title><![CDATA[Reply to help claims that guideline.selected exists but does not on Fri, 10 Apr 2020 10:10:51 GMT]]></title><description><![CDATA[<p dir="auto">hi <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/454">@jansindl3r</a>,</p>
<p dir="auto">guidelines currently don’t implement the <code>selected</code> attribute in RF.</p>
<p dir="auto">not sure if there’s a reason behind it… seems like it could be useful? <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/1">@frederik</a></p>
<p dir="auto">thanks!</p>
]]></description><link>https://forum.robofont.com/post/3179</link><guid isPermaLink="true">https://forum.robofont.com/post/3179</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Fri, 10 Apr 2020 10:10:51 GMT</pubDate></item><item><title><![CDATA[Reply to help claims that guideline.selected exists but does not on Fri, 10 Apr 2020 12:51:53 GMT]]></title><description><![CDATA[<p dir="auto">in RF a guide is only selected during a drag... so in all other cases they are not selected!</p>
]]></description><link>https://forum.robofont.com/post/3181</link><guid isPermaLink="true">https://forum.robofont.com/post/3181</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Fri, 10 Apr 2020 12:51:53 GMT</pubDate></item><item><title><![CDATA[Reply to help claims that guideline.selected exists but does not on Fri, 10 Apr 2020 13:20:41 GMT]]></title><description><![CDATA[<p dir="auto">how do you get the activated guideline, then? If I right click and want to have contextual action for this specific guideline? right clicked == dragged?</p>
]]></description><link>https://forum.robofont.com/post/3184</link><guid isPermaLink="true">https://forum.robofont.com/post/3184</guid><dc:creator><![CDATA[jansindl3r]]></dc:creator><pubDate>Fri, 10 Apr 2020 13:20:41 GMT</pubDate></item><item><title><![CDATA[Reply to help claims that guideline.selected exists but does not on Fri, 10 Apr 2020 14:53:11 GMT]]></title><description><![CDATA[<p dir="auto">you can add a item in the guideline contextual menu by subscribing to the notification: <code>guideAdditionContextualMenuItems</code> and append a tuple of <code>(menu titles, callback)</code> to <code>additionContextualMenuItems</code> key in the notification object.</p>
<p dir="auto">see <a href="https://robofont.com/documentation/building-tools/api/custom-observers/#RoboFont%20observers.guideAdditionContextualMenuItems" rel="nofollow">https://robofont.com/documentation/building-tools/api/custom-observers/#RoboFont observers.guideAdditionContextualMenuItems</a></p>
]]></description><link>https://forum.robofont.com/post/3185</link><guid isPermaLink="true">https://forum.robofont.com/post/3185</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Fri, 10 Apr 2020 14:53:11 GMT</pubDate></item><item><title><![CDATA[Reply to help claims that guideline.selected exists but does not on Fri, 08 May 2020 18:30:48 GMT]]></title><description><![CDATA[<p dir="auto">Maybe it is not clear to me, but should be the active guideline in the sender argument of function <code>testje</code>? I want to right click the guideline and flip it horizontally or vertically.</p>
<pre><code class="language-python">from mojo.events import addObserver, clearObservers
# clearObservers()
class Test(object):
    
    def __init__(self):
        
        addObserver(self, "guideAdditionContextualMenuItems", "guideAdditionContextualMenuItems")
        
    def guideAdditionContextualMenuItems(self, notification):
        myMenuItems = [
            ("testje", self.testje), 
            ]
        notification["additionContextualMenuItems"].extend(myMenuItems)
    
    def testje(self, sender):
        print(dir(sender))

Test()
</code></pre>
]]></description><link>https://forum.robofont.com/post/3291</link><guid isPermaLink="true">https://forum.robofont.com/post/3291</guid><dc:creator><![CDATA[jansindl3r]]></dc:creator><pubDate>Fri, 08 May 2020 18:30:48 GMT</pubDate></item><item><title><![CDATA[Reply to help claims that guideline.selected exists but does not on Sat, 09 May 2020 11:53:13 GMT]]></title><description><![CDATA[<p dir="auto">hello <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/454">@jansindl3r</a>,</p>
<p dir="auto">the current guideline is only available from an interactive tool.</p>
<p dir="auto">here’s an example: (shift-click guide to flip direction)</p>
<pre><code class="language-python">from mojo.events import EditingTool, installTool

class FlipGuideTool(EditingTool):
    
    def getToolbarTip(self):
        return "flip guide"

    def mouseDown(self, point, clickCount):
        g = CurrentGlyph()
        guides = CurrentGuidelines()
        if guides and self.shiftDown:
            guides[0].angle += 90

installTool(FlipGuideTool())
</code></pre>
<p dir="auto">cheers!</p>
]]></description><link>https://forum.robofont.com/post/3293</link><guid isPermaLink="true">https://forum.robofont.com/post/3293</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Sat, 09 May 2020 11:53:13 GMT</pubDate></item></channel></rss>