On Fri, Jul 6, 2012 at 12:34 PM, Dino Viehland <di...@microsoft.com> wrote: > Jeff wrote: >> Android has some limitations around what you can inherit from. It requires >> some AOT steps to inherit from Java classes ... which includes all of the UI >> widgets. I was hand-crafting the wrappers that just forward to Python code, >> but I figured there had to be an easier way, and pyc.py (or similar) seems >> like >> the ticket. >> > > Not quite sure how this fits in with Java and Android, but throwing those out > of the picture (let's say we're on the Windows Phone 7 and we don't have > access > to RefEmit), this too can actually potentially be handled by __clrtype__ :)
The full explanation is at http://docs.xamarin.com/android/about/limitations and http://docs.xamarin.com/android/advanced_topics/architecture/android_callable_wrappers. It's similar to .NET's CCW support. > > You'll just need to run NewTypeMaker in a mode where it saves to disk (we > can already do this I believe for debug builds where we want to verify the > IL is legal). Then you just need a metaclass which goes off to the > pre-compiled assembly and loads it rather than generating it. > > I can definitely see the desire to bring it all together in one tool though as > there's now lots of moving parts. Yeah, -X:SaveAssemblies. Super useful, but it requires running the code, and I'd like to avoid that when generating the wrappers if possible. With some annotations (and maybe some assumptions), all of the information needed can be in the source code. - Jeff _______________________________________________ Ironpython-users mailing list Ironpython-users@python.org http://mail.python.org/mailman/listinfo/ironpython-users