inconsistencies with PyModels
Lorenzo Gil Sanchez <[email protected]> Wed, 11 Aug 2004 18:36:58 +0200
| Newsgroups | gmane.comp.python.modeling |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I'm finding some problems when creating a PyModel:
model.addEntity(my_entity) does nothing but
model.entities.append(my_entitye) works
This is not really important and I guess it's easy to fix. The next
problem is more important:
model.build
defaultModelSet().addModel(model)
fails with this exception:
File
"/home/lgs/proyectos/gruppy/middletier/DOF/m/DomainObjectFramework.py",
line 40, in __init__
defaultModelSet().addModel(model)
File "/opt//lib/python2.3/site-packages/Modeling/ModelSet.py", line
138, in addModel
if aModel.name() in self.modelsNames():
TypeError: 'str' object is not callable
defaultModelSet().addModel(model.component)
works without a warning but I'm not sure if this is the preferred way of
adding a model to the modelset.
Cheers
Lorenzo Gil Sanchez
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285