Re: inconsistencies with PyModels
Sebastien Bigaret <[email protected]> Fri, 13 Aug 2004 00:29:47 +0200
| Newsgroups | gmane.comp.python.modeling |
|---|---|
| Message-ID | <[email protected]> |
Lorenzo Gil Sanchez wrote: > 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. Probably easy to fix, yes, I'll check that, thanks for reporting. > The next problem is more important: > > model.build > defaultModelSet().addModel(model) > > fails with this exception: [...] > 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. Yes, this is a known bug, ModelSet.addModel() (and other methods in ModelSet as well) only accepts Modeling.Model objects, not PyModels. In the meantime, adding the PyModel.component is the correct workaround. -- Sébastien. ------------------------------------------------------- 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