<div>I can&#39;t see into any of the helpers you&#39;ve defined.&nbsp; What do you get if you cut this down to the smallest possible program?</div>
<div>&nbsp;</div>
<div>public static void Main() {<br>&nbsp; &nbsp;&nbsp;ScriptRuntime runtime = ScriptRuntime.Create();<br>&nbsp; &nbsp;&nbsp;ScriptEngine engine = runtime.GetEngine(&quot;py&quot;);<br>&nbsp; &nbsp;&nbsp;foreach (string s in engine.GetRegisteredExtensions()) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.Console.WriteLine(s);</div>

<div>&nbsp;&nbsp;&nbsp; }<br>}<br><br></div>
<div class="gmail_quote">On Wed, Jun 11, 2008 at 12:23 PM, Ben Hall &lt;<a href="mailto:ben2004uk@googlemail.com">ben2004uk@googlemail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>I have been using the latest release of the DLR (the one from<br>yesterday) but the behaviour of GetRegisteredExtensions() seems to<br>
have changed (or is broke).<br><br>I&#39;ve got this test:<br><br>&nbsp; &nbsp; &nbsp; &nbsp;[Test]<br>&nbsp; &nbsp; &nbsp; &nbsp;public void GetSaveFilter_RegisteredTypes_String()<br>&nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string expected = &quot;IronPython 2.0 Beta|*.py&quot;;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LanguageSettings python = Helper.CreateIronPythonSettings();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DLREngineFactory factory = new DLREngineFactory();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ScriptEngine engine = factory.CreateEngine(python);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EngineInformation info = new EngineInformation(engine);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string actual = info.GetSaveFilter();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Assert.AreEqual(expected, actual);<br>&nbsp; &nbsp; &nbsp; &nbsp;}<br><br>With IP Beta 2, this worked fine, but since upgrading it now fails.<br>The code is this:<br><br>&nbsp; &nbsp; &nbsp; &nbsp;public string GetSaveFilter()<br>
&nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string filter = string.Empty;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;foreach (string ext in Engine.GetRegisteredExtensions())<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;filter += string.Format(&quot;{0}|*{1}&quot;,<br>Engine.LanguageDisplayName, ext);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return filter;<br>&nbsp; &nbsp; &nbsp; &nbsp;}<br><br>&gt;From what I can tell, the code is dropping into<br>GetRegisteredFileExtensions(LanguageContext context) &nbsp;which does a<br>check to see if the LanguageContext is null, but it always seems to be<br>
null.<br>if (kvp.Value.LanguageContext == context) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;res.Add(kvp.Key);<br>}<br><br>Can anyone else confirm this?<br><br>Its the same for GetRegisteredIdentifiers().<br><br>Thanks<br><br>Ben<br><a href="http://blog.benhall.me.uk/" target="_blank">Blog.BenHall.me.uk</a><br>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br><a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</blockquote></div><br>