[Erp5-dev] getter for acquired property

Bartłomiej Górny bartek at gorny.najlepsze.pl
Tue Jan 3 19:44:49 CET 2006


Jérôme Perrin wrote:
> Le Mardi 3 Janvier 2006 13:14, Bartłomiej Górny a écrit :
>> Jérôme Perrin wrote:
>>> Le Lundi 2 Janvier 2006 22:00, Bartłomiej Górny a écrit :
>> Now, a getter created in this way (like getSocialCapitalCurrencyId)
>> checks portal type and return none if the type of related object is not
>> correct. Can a property sheet create setters which would perform a
>> similar check?
> 
> the portal type here is not meant to be checked, CMFCategory creates relations 
> as a colored graph, portal type is the color. The idea is that you can have 
> an Organisation as source_section and a Person as source_section, you call 
> appropriate getters like :
>   getSourceSection(portal_type='Organisation')
> and setters : 
>   setSourceSection(p, portal_type='Person')

So I can have multiple objects of different types under one category... 
ok, got it. And to have multiple objects in one category I have to pass 
portal_type as a keyword argument to the setter, correct?

A few more emails, and we will have a man page ready :)

Bartek





More information about the Erp5-dev mailing list