[Product-Developers] AGX neither a method nor a callable

bad_my84 bas.roijen at cofely-gdfsuez.nl
Tue Sep 8 14:32:03 UTC 2009

Maurits van Rees-3 wrote:
> bad_my84, on 2009-09-08:
>> Hi all,
>> I'm developing my own product in archgenxml but I'm running into problems
>> with a default_method.
>> I have 2 simple classes: employee and agreement. Agreement is contained
>> in
>> employee (composition).
>> In agreement there is a StringField (called employee) which I want to
>> give
>> the default of employee title.
>> To the employee StringField I added the tagged value 'default_method:
>> findParentTitle'
>> In Agreement.py I added the following code to the 'code-section
>> after-local-schema':
>>     security.declarePublic('findParentTitle')
>>     def findParentTitle(self):
>>         """
>>         Populates the field with the title of its parent.
>>         """
>>         return self.aq_parent.getTitle()
>> What am I missing here?
> Try:
>     return self.aq_parent.Title()
> The title and description fields are exceptions to the rule that the
> generated 'getter' of the field is 'get' plus the capitalized
> fieldname.  The getters of these two fields are Title and Description.
> I would expect a different error message though, so maybe this is
> unrelated.

I already tried Title() and 'get' plus capitalized fieldname.
Does it have something to do with security?
View this message in context: http://n2.nabble.com/AGX-neither-a-method-nor-a-callable-tp3603494p3603671.html
Sent from the Product Developers mailing list archive at Nabble.com.

More information about the Product-Developers mailing list