<?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[Observer for active document change?]]></title><description><![CDATA[<p dir="auto">Is there an event observer that can detect when the user switches from one open document to another? I have a Vanilla popup button whose menu should always show the list of open fonts. Right now I get that list with <code>AllFonts()</code> and update it when <code>fontDidOpen</code> or <code>fontDidClose</code>. But that list is ordered according to the window stack, and I don't see a Mojo event for when the active (top-most) document or window changes.</p>
<p dir="auto">Is there such an event? Or could I achieve the same thing by observing a bunch of the <code>...WindowDidOpen</code> and <code>...WindowWillClose</code> events? Thanks!</p>
]]></description><link>https://forum.robofont.com/topic/928/observer-for-active-document-change</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 19:06:32 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/928.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 15 Mar 2021 17:15:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Observer for active document change? on Mon, 15 Mar 2021 17:15:46 GMT]]></title><description><![CDATA[<p dir="auto">Is there an event observer that can detect when the user switches from one open document to another? I have a Vanilla popup button whose menu should always show the list of open fonts. Right now I get that list with <code>AllFonts()</code> and update it when <code>fontDidOpen</code> or <code>fontDidClose</code>. But that list is ordered according to the window stack, and I don't see a Mojo event for when the active (top-most) document or window changes.</p>
<p dir="auto">Is there such an event? Or could I achieve the same thing by observing a bunch of the <code>...WindowDidOpen</code> and <code>...WindowWillClose</code> events? Thanks!</p>
]]></description><link>https://forum.robofont.com/post/3600</link><guid isPermaLink="true">https://forum.robofont.com/post/3600</guid><dc:creator><![CDATA[nowell]]></dc:creator><pubDate>Mon, 15 Mar 2021 17:15:46 GMT</pubDate></item><item><title><![CDATA[Reply to Observer for active document change? on Mon, 15 Mar 2021 20:38:29 GMT]]></title><description><![CDATA[<p dir="auto">I don't have an answer but you can always check the event observer extension to see what's being posted.</p>
<p dir="auto">There are events for<br />
fontResignCurrent<br />
fontBecameCurrent</p>
<p dir="auto">You can also sort AllFonts() using <a href="https://robofont.com/documentation/building-tools/toolspace/mojo/sort-fonts-list/" rel="nofollow">https://robofont.com/documentation/building-tools/toolspace/mojo/sort-fonts-list/</a></p>
]]></description><link>https://forum.robofont.com/post/3601</link><guid isPermaLink="true">https://forum.robofont.com/post/3601</guid><dc:creator><![CDATA[okaytype]]></dc:creator><pubDate>Mon, 15 Mar 2021 20:38:29 GMT</pubDate></item><item><title><![CDATA[Reply to Observer for active document change? on Tue, 16 Mar 2021 14:24:12 GMT]]></title><description><![CDATA[<p dir="auto">Thank you so much, <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/372">@okaytype</a>! <code>fontBecameCurrent</code> is exactly what I was looking for. I’m familiar with sorting <code>AllFonts()</code> but was hoping to have my list ordered according to the window stack.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/1">@frederik</a>, could you add <code>fontBecameCurrent</code> to the <a href="https://robofont.com/documentation/building-tools/api/custom-observers/" rel="nofollow"><em>RoboFont Observers</em></a> doc? It seems to be missing.</p>
]]></description><link>https://forum.robofont.com/post/3602</link><guid isPermaLink="true">https://forum.robofont.com/post/3602</guid><dc:creator><![CDATA[nowell]]></dc:creator><pubDate>Tue, 16 Mar 2021 14:24:12 GMT</pubDate></item></channel></rss>