I am embedding Microsoft Virtual Earth into a WPF project that uses python as the scripting language. VE must run as a webcontrol. Tasks that I have completed: 1. Creating the XAML wrapper 2. Embed the WebControl object in the XAML 3. loading XAML with the Avalon module from the Python tutorials 4. Using .InvokeScript() to call Jscript routines inside the web control and having VirtualEarth respond What I am having trouble with is passing information back from VirtualEarth to Python. the HTML object in JScript supports calling functions in the outer wrapper with: windows.external.somefunction(...); If class that holds somefunction() is decorated with [Com(visible=true)] then all works. The issue is that Python classes and functions are not (and probably cannot) be made [Com(visible=true)] (they are need to be dynamically added and changed. What I am considering is having a C# lib that Python loads that contains an "interceptor" class. This class would receive the calls from Jscript, packages them into events and then trigger the event so that python can receive them. Questions: 1) Do any IronPython or .NET gurus here see an show stoppers with this approach? 2) Are there any technical "gotcha's" I should look out for?
_______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
