Forum OpenACS Q&A: Re: A doubt about Xotcl Acs objects inheritance

Collapse
Posted by Gustaf Neumann on
Antonio,

in the oacs-type world, it is not possible to subclass an class to provide application specific logic. The mapping was built with notion that all it does is to put a layer over the acs-object system. Application logic can be added in xotcl in many ways, including mixins, etc.

However, you are absolutely right with your observation that mk_save and mk_insert are asymmetrical, it would be better to have a mk_insert and an mk_update. The "save" method should call "update" like the "save-new" method calls "insert".

i've commited this to cvs, it is structurally a simple change and seems to work, and should better fit your use cases.

all the best
-g