+-------[ Roman Klesel ]----------------------
| Hello,

| class ZLTMS(Lasttest,Implicit, Persistent, PropertyManager, ObjectManager, 
SimpleItem):
|       """ZLMTS object"""
| 
| ... has an import method
| 
|       def newLasttest(self, REQUEST=None):
|               """ new """
|               ltc=getattr(self,'LoadTests')
|               ltid = self.genId(ltc)
|               lt=Lasttest()
|               lt.id=ltid
|               ltc._setObject(ltid,lt)
|               self.lt = getattr(ltc,ltid)
|               self.lt.importData(self.manage_targets)
| 
| This generates and instance of the Lasttest() class and imports the data.
| Lasttest() subclasses from Folder() and store all imported data in a folder 
hirarchy under itself.
| 
| This all works fine and I can browse the imported data in the ZMI. The 
problems start when I want to access the data.
| 
| eg.:
| 
| In the base class I created a test3() method:
| 
|       def test3(self):
|               """dsaf"""
|               return self.getId()
| 
| I can call this method on whatever folder inside the product instance I want, 
it will always return the id of the
| product and not the id of the product I call it on.
| 
| Why is that?

Are you sure your genId() method works?

what does return self.id return instead of self.getId() ?

-- 
Andrew Milton
[EMAIL PROTECTED]
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to