I now have something people can play with on the python22-branch. I
turned off the part of the code generator that handles the (fields ...)
section for (define-object ...) definitions, as I haven't decided how to
implement them. Now the pygtk-demo example runs without modification,
which is a good sign.
I am uploading a tarball of the current state of the branch at:
http://www.gnome.org/~james/pygtk-1.99.2-py22.tar.gz
At the moment, it looks like the correct way to handle object fields is
with the tp_getset type slot. However, this would introduce a little bit
of breakage, as you wouldn't be able to have object attributes with the
same name as a field.
Currently, if an object o has a field names field, the following happens:
print o.field # prints the value of the field
o.field = 1
print o.field # prints 1
Using the tp_getset stuff, you can't set the field attributes (unless a
setter function is given), so the second statement would probably raise an
read only attribute exception.
Does anyone have any opinions on this?
James.
--
Email: [EMAIL PROTECTED]
WWW: http://www.daa.com.au/~james/
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk