<?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[my custom spaceCenter is broken. Maybe a bug?]]></title><description><![CDATA[<p dir="auto">I have to make a custom window with a space center.<br />
Unfortunately, somehow I cannot do it.</p>
<p dir="auto">Here is my code:</p>
<pre><code class="language-python">from vanilla import Window
from mojo.UI import SpaceCenter

class StupidSpaceCenter(SpaceCenter):

    def layersChanged(self, sender):
        print('layer has changed')
        # I will put a lot of code here

class StupidSpaceCenterWindow(object):
 
    def __init__(self, font):
        self.font = font
        self.w = Window((800, 600), 'Sandwich Space Center', minSize=(600, 400), autosaveName='com.rb.StupidSpaceCenterWindow')
        self.w.spaceCenter = StupidSpaceCenter((0, 0, -0, -0), self.font, glyphNames='ABC')
        self.w.open()

StupidSpaceCenterWindow(CurrentFont().naked())
</code></pre>
<p dir="auto">and this is an error that I get whenever I change some spacing.</p>
<pre><code class="language-console">Traceback (most recent call last):
 File "lib/doodleDelegate.pyc", line 96, in sendEvent_
 File "lib/UI/spaceCenter/multiLineScrollScrollView.pyc", line 1750, in mouseDragged_
 File "lib/fontObjects/doodleGlyph.pyc", line 157, in _set_rightMargin
 File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/objects/base.py", line 169, in releaseHeldNotifications
 dispatcher.releaseHeldNotifications(observable=self, notification=notification)
 File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/tools/notifications.py", line 260, in releaseHeldNotifications
 self.postNotification(notification, observableRef(), data)
 File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/tools/notifications.py", line 201, in postNotification
 callback(notificationObj)
 File "lib/UI/spaceCenter/__init__.pyc", line 1005, in _glyphWidthChanged
 File "lib/UI/spaceCenter/multiLineScrollScrollView.pyc", line 2457, in _updatesBlocked
 File "lib/UI/spaceCenter/multiLineScrollScrollView.pyc", line 718, in isFirstResponder
AttributeError: 'NoneType' object has no attribute 'isMainWindow'
</code></pre>
<p dir="auto">How can I fix it? What am I doing wrong?<br />
Maybe it is a bug (because this <a href="https://robofont.com/documentation/building-tools/api/mojo/mojo-ui/?#mojo.UI.SpaceCenter" rel="nofollow">example</a> from the documentation throws the same error)?</p>
<p dir="auto">Thanks, guys in advance for ur help<br />
Cheers</p>
]]></description><link>https://forum.robofont.com/topic/819/my-custom-spacecenter-is-broken-maybe-a-bug</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 03:54:32 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/819.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Mar 2020 21:59:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to my custom spaceCenter is broken. Maybe a bug? on Thu, 26 Mar 2020 14:31:03 GMT]]></title><description><![CDATA[<p dir="auto">I have to make a custom window with a space center.<br />
Unfortunately, somehow I cannot do it.</p>
<p dir="auto">Here is my code:</p>
<pre><code class="language-python">from vanilla import Window
from mojo.UI import SpaceCenter

class StupidSpaceCenter(SpaceCenter):

    def layersChanged(self, sender):
        print('layer has changed')
        # I will put a lot of code here

class StupidSpaceCenterWindow(object):
 
    def __init__(self, font):
        self.font = font
        self.w = Window((800, 600), 'Sandwich Space Center', minSize=(600, 400), autosaveName='com.rb.StupidSpaceCenterWindow')
        self.w.spaceCenter = StupidSpaceCenter((0, 0, -0, -0), self.font, glyphNames='ABC')
        self.w.open()

StupidSpaceCenterWindow(CurrentFont().naked())
</code></pre>
<p dir="auto">and this is an error that I get whenever I change some spacing.</p>
<pre><code class="language-console">Traceback (most recent call last):
 File "lib/doodleDelegate.pyc", line 96, in sendEvent_
 File "lib/UI/spaceCenter/multiLineScrollScrollView.pyc", line 1750, in mouseDragged_
 File "lib/fontObjects/doodleGlyph.pyc", line 157, in _set_rightMargin
 File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/objects/base.py", line 169, in releaseHeldNotifications
 dispatcher.releaseHeldNotifications(observable=self, notification=notification)
 File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/tools/notifications.py", line 260, in releaseHeldNotifications
 self.postNotification(notification, observableRef(), data)
 File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/tools/notifications.py", line 201, in postNotification
 callback(notificationObj)
 File "lib/UI/spaceCenter/__init__.pyc", line 1005, in _glyphWidthChanged
 File "lib/UI/spaceCenter/multiLineScrollScrollView.pyc", line 2457, in _updatesBlocked
 File "lib/UI/spaceCenter/multiLineScrollScrollView.pyc", line 718, in isFirstResponder
AttributeError: 'NoneType' object has no attribute 'isMainWindow'
</code></pre>
<p dir="auto">How can I fix it? What am I doing wrong?<br />
Maybe it is a bug (because this <a href="https://robofont.com/documentation/building-tools/api/mojo/mojo-ui/?#mojo.UI.SpaceCenter" rel="nofollow">example</a> from the documentation throws the same error)?</p>
<p dir="auto">Thanks, guys in advance for ur help<br />
Cheers</p>
]]></description><link>https://forum.robofont.com/post/3104</link><guid isPermaLink="true">https://forum.robofont.com/post/3104</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Thu, 26 Mar 2020 14:31:03 GMT</pubDate></item><item><title><![CDATA[Reply to my custom spaceCenter is broken. Maybe a bug? on Tue, 10 Mar 2020 22:18:07 GMT]]></title><description><![CDATA[<p dir="auto">I cannot reproduce this error...</p>
<p dir="auto">What version of RF are you using?<br />
Does this happen after a fresh restart?<br />
Does this happen in safe mode? (start up with shift down, no extension, start up script will be installed)</p>
]]></description><link>https://forum.robofont.com/post/3105</link><guid isPermaLink="true">https://forum.robofont.com/post/3105</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Tue, 10 Mar 2020 22:18:07 GMT</pubDate></item><item><title><![CDATA[Reply to my custom spaceCenter is broken. Maybe a bug? on Fri, 13 Mar 2020 10:03:48 GMT]]></title><description><![CDATA[<p dir="auto">ok, after the fresh restart everything worked fine if I was in the space center. But when I opened any of the glyphs in glyph window that were also opened in the SC, the same error showed up.</p>
<p dir="auto">When I open it with the safe mode (by the way, I never knew about it, great feature, thanks for telling me about it), there is nothing in the output.</p>
<p dir="auto">small question:<br />
<code>layersChanged</code> is run on the edit of the glyph (like <code>glyph.addObserver(self, 'glyphHasChanged', 'Glyph.Changed')</code>) or whenever I'm changing the active layer?</p>
<p dir="auto">My version of the RF is the last beta</p>
]]></description><link>https://forum.robofont.com/post/3106</link><guid isPermaLink="true">https://forum.robofont.com/post/3106</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Fri, 13 Mar 2020 10:03:48 GMT</pubDate></item><item><title><![CDATA[Reply to my custom spaceCenter is broken. Maybe a bug? on Fri, 13 Mar 2020 10:04:09 GMT]]></title><description><![CDATA[<p dir="auto">EDIT:</p>
<p dir="auto">the issue occurs when I try to print out the sender in the <code>layerChanged</code>.</p>
<p dir="auto">before I put sender in the print statement, inside of the <code>layerChanged</code>, nothing happened when I've edited the glyph. Nothing also printed (even if the debug print statement was inside this callback).</p>
]]></description><link>https://forum.robofont.com/post/3107</link><guid isPermaLink="true">https://forum.robofont.com/post/3107</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Fri, 13 Mar 2020 10:04:09 GMT</pubDate></item><item><title><![CDATA[Reply to my custom spaceCenter is broken. Maybe a bug? on Wed, 11 Mar 2020 09:29:34 GMT]]></title><description><![CDATA[<p dir="auto">the <code>layersChanged</code> is a callback from the layer popup button in a space center... not really meant to be overwritten...</p>
<p dir="auto">What is it you would like to achieve?</p>
<p dir="auto">Since the traceback is gone in safe mode, I assume an other extension, script is interfering.</p>
<p dir="auto">Or a reference of an closed space center has still active observers on the defcon <code>Glyph.WidthChanged</code> notification.</p>
]]></description><link>https://forum.robofont.com/post/3108</link><guid isPermaLink="true">https://forum.robofont.com/post/3108</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Wed, 11 Mar 2020 09:29:34 GMT</pubDate></item><item><title><![CDATA[Reply to my custom spaceCenter is broken. Maybe a bug? on Wed, 11 Mar 2020 18:40:03 GMT]]></title><description><![CDATA[<p dir="auto">I would like to change simultaneously values for the sidebearings in all font's layers, whenever the spacing is being changed in the SC.</p>
<p dir="auto">In order to do that I'm trying to create a system of observers. Now I changed approach and I'm using <code>Glyph.WidthChanged</code></p>
]]></description><link>https://forum.robofont.com/post/3109</link><guid isPermaLink="true">https://forum.robofont.com/post/3109</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Wed, 11 Mar 2020 18:40:03 GMT</pubDate></item><item><title><![CDATA[Reply to my custom spaceCenter is broken. Maybe a bug? on Wed, 11 Mar 2020 20:02:45 GMT]]></title><description><![CDATA[<p dir="auto">ok, I solved my issues with a different approach</p>
]]></description><link>https://forum.robofont.com/post/3110</link><guid isPermaLink="true">https://forum.robofont.com/post/3110</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Wed, 11 Mar 2020 20:02:45 GMT</pubDate></item><item><title><![CDATA[Reply to my custom spaceCenter is broken. Maybe a bug? on Wed, 11 Mar 2020 20:44:53 GMT]]></title><description><![CDATA[<p dir="auto">euhm use alt + drag metrics :) to apply the change to all layers... both in glyph view as in a space center</p>
]]></description><link>https://forum.robofont.com/post/3111</link><guid isPermaLink="true">https://forum.robofont.com/post/3111</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Wed, 11 Mar 2020 20:44:53 GMT</pubDate></item><item><title><![CDATA[Reply to my custom spaceCenter is broken. Maybe a bug? on Fri, 13 Mar 2020 10:02:41 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">euhm use alt + drag metrics :) to apply the change to all layers... both in glyph view as in a space center</p>
</blockquote>
<p dir="auto">HAHAHA, thanks!!!</p>
<p dir="auto">Of course, I had no idea about that.</p>
<p dir="auto">Damn, I love it, I already made a sophisticated observer system, which checks which space center is being used, activates <code>Glyph.LeftMarginDidChange</code> etc, etc…</p>
<p dir="auto">At least now I'm also able to use normal step-by-step spacing for all of the layers :D, not only dragging</p>
]]></description><link>https://forum.robofont.com/post/3112</link><guid isPermaLink="true">https://forum.robofont.com/post/3112</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Fri, 13 Mar 2020 10:02:41 GMT</pubDate></item></channel></rss>