<?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[should I remove defcon glyph&#x27;s observer?]]></title><description><![CDATA[<p dir="auto">I want to track changes in the current glyph by using <code>RGlyph.addObserver(self, 'glyphHasChanged', 'Glyph.Changed)</code>. Is it necessary to remove this observer whenever the current glyph changes? Or does it unsubscribes by itself when the character in the Glyph Window changes?</p>
<p dir="auto">I'm asking this question because I'm curious if I'm not adding unnecessary code to my tools.</p>
<p dir="auto">Best,<br />
R</p>
]]></description><link>https://forum.robofont.com/topic/682/should-i-remove-defcon-glyph-s-observer</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 05:01:16 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/682.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Aug 2019 17:00:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to should I remove defcon glyph&#x27;s observer? on Thu, 08 Aug 2019 17:00:06 GMT]]></title><description><![CDATA[<p dir="auto">I want to track changes in the current glyph by using <code>RGlyph.addObserver(self, 'glyphHasChanged', 'Glyph.Changed)</code>. Is it necessary to remove this observer whenever the current glyph changes? Or does it unsubscribes by itself when the character in the Glyph Window changes?</p>
<p dir="auto">I'm asking this question because I'm curious if I'm not adding unnecessary code to my tools.</p>
<p dir="auto">Best,<br />
R</p>
]]></description><link>https://forum.robofont.com/post/2575</link><guid isPermaLink="true">https://forum.robofont.com/post/2575</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Thu, 08 Aug 2019 17:00:06 GMT</pubDate></item><item><title><![CDATA[Reply to should I remove defcon glyph&#x27;s observer? on Sat, 10 Aug 2019 12:04:27 GMT]]></title><description><![CDATA[<p dir="auto">hello <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/207">@RafaŁ-Buchner</a>,</p>
<p dir="auto">yes, I think it’s a good idea to remove the observer in your code.</p>
<p dir="auto">here’s what the <a href="http://ts-defcon.readthedocs.io/en/latest/concepts/notifications.html" rel="nofollow">defcon documentation</a> says:</p>
<blockquote>
<p dir="auto"><strong>Don’t Forget removeObserver</strong></p>
<p dir="auto">The only real gotcha in this is that you must remove the observer from the observed object when the observation is no longer needed. If you don’t do this and the observed object is changed, it will try to post a notification to the object you have discarded. That could lead to trouble.</p>
</blockquote>
<p dir="auto">and here’s an <a href="http://robofont.com/documentation/building-tools/toolspace/observers/stencil-preview/" rel="nofollow">example script</a> in which the defcon <code>Glyph.Changed</code> observer is removed when the current glyph changes.</p>
]]></description><link>https://forum.robofont.com/post/2579</link><guid isPermaLink="true">https://forum.robofont.com/post/2579</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Sat, 10 Aug 2019 12:04:27 GMT</pubDate></item></channel></rss>