Re: [Pyobjc-dev] nswindow subclass
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-02-11 22:20:43
|
Gus Mueller wrote: > > You can simply add 'import PydgetWindow' in __main__.py [assuming > > that is the name of the source file]... > > It wasn't a python file, it was a compiled objc class.. but I did > what you described, and that worked just fine. > > But now I'm slightly curious why the other way didn't work. Maybe > I'll play with it a little bit more. That's because the app as you compile it is merely a wrapper that starts a new process. (Read the main .m file for details and look for execve. For the _reasons_ of this, check the list archives...) I _think_ what could work is building a minimal C extension that contains the class and import that. While that's definitely more work than adding a .m file to your project, it can probably be streamlined with a template. I haven't heard of anyone who actually _did_ this, but I don't see why it wouldn't work. Would be nice to find out, though... Just |