Why are we inheriting !BaseObject's get...

Developers
2011-01-28
2013-04-25
  • Jean Jordaan

    Jean Jordaan - 2011-01-28

    I was surprised to find that getField doesn't:

    >>> print p.getForm().getField('ProjectManager')
    None
    >>> db.getForm('frmProject')
    <PlominoField at /mnt/database/frmProject/ProjectManager>
    >>> ndb.getForm('frmProject').getField.im_func.func_code
    <code object getField at 0x9ade260, file "/home/plomino/buildout-cache/eggs/Products.Archetypes-1.5.15-py2.4.egg/Products/Archetypes/BaseObject.py", line 238>

    Why are we inheriting !BaseObject's irrelevant `getField`?

    (For that matter, why is Plomino stepping on Archetypes' `getField` in the first place …)

     
  • Eric Brehault

    Eric Brehault - 2011-01-28

    yes right
    the actual method is getFormField

     
  • Jean Jordaan

    Jean Jordaan - 2011-01-28

    Ah, I was confused by
    self.getField('FormLayout')
    in PlominoForm, which does refer to the Schema. Sorry for the noise!

     

Log in to post a comment.