Re: [Pyobjc-dev] NSDocument based app
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2002-11-06 10:19:20
|
On Wednesday, Nov 6, 2002, at 10:52 Europe/Amsterdam, Peter Montagner wrote: >> The last argument is problematic: void pointers currently require >> manual assistance. We can at least support automatic translation from >> None to a NULL pointer. > > So (void *) arguments are broken? Hmm... well I can avoid that in my > example app by using the print panel rather than the sheet. The panel > doesn't require a call back. There are a few things that use the (void > *)contextInfo paradigm though, so we should probably fix it. What's > the current scheme? > Not really broken, just not working as you want :-) Problem is that it hard to automaticly translate from a Python object to a void*: Do you want to pass the object itself (like you probably want to do here) or should the object be translated to some native type (like you'd want to do with 'int write(int fd, void* buf, int len)'). The current scheme is that you'll have to manually write methods that do the right thing. But, I'll probably add a mechanism to get this type of void* arguments to work without writing C code. Ronald |