Hi.
> class PClazz(JClazz):
> def __setattr__(self,name,value):
> if name != 'jfield':
> # for python fields, use __dict__
> self.__dict__[name] = value
> else:
> print "Changing jfield..."
> # an then ????
>
With the following idiom/hack:
JClazz.jfield._doset(self,value)
it's not really officially documented/supported.
Warning: probably with Jython 2.2 this idiom will change or at least be deprecated.
regards, Samuele Pedroni.
|