[Ironpython-users] GUI Toolkits

Jeff Hardy jdhardy at gmail.com
Wed Dec 3 16:25:42 CET 2014


On Wed, Dec 3, 2014 at 1:57 PM, Jeff Hardy <jdhardy at gmail.com> wrote:

> On Wed, Dec 3, 2014 at 9:19 AM, Andrew Ayre <andy at britishideas.com> wrote:
>
>> Hi Markus,
>>
>> Thanks for responding to my plea for help. I was leaning towards
>> something like your first suggestion but I like your second suggestion
>> better! HTML opens up possibilities for users to add logos, etc to their
>> forms if they wish, and HTML is widely known.
>>
>
> This is a really common pattern on mobile apps, actually - host most of
> the app in a WebView and just have a bit of chrome around it to control
> things.
>
> I never realized that WebBrowserControl had the two-way capabilities that
> it does (c.f.
> http://msdn.microsoft.com/en-us/library/a0746166(v=vs.110).aspx).
> Interesting possibilities there.
>

Random other notes: you probably can't use an IronPython class with
.ObjectForScripting directly (not ComVisible). However, it should work if
there is a shim class in C# that implements Sys.Ref.IReflect and adapts
that interface to the IDMOP interface used by Python objects. Not an easy
class to write, but it would only need to be written once and tossed in the
clr module.

I don't know if anyone's tried it, though, so it's all theoretical.

(Mostly taken from
http://blogs.msdn.com/b/srivatsn/archive/2008/05/09/accessing-ironpython-objects-from-native-javascript.aspx
and
http://blogs.msdn.com/b/shrib/archive/2007/09/04/ireflect-and-idispatch.aspx
).

- Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20141203/e78bbab4/attachment.html>


More information about the Ironpython-users mailing list