[Chandler-dev] Dashboard domain model questions

Grant Baillie grant at osafoundation.org
Thu Jun 29 15:25:40 PDT 2006


On 29 Jun, 2006, at 15:16, Bryan Stearns wrote:

>>> - Do we need specific Calculated methods for index-dependent  
>>> dynamic values? (Does Calculated need to move to Schema for this?)
>>
>> What is a 'Calculated' method ?
> Grant's answer, which just arrived as I was writing a worse one, is  
> right; he said:
>> I think Bryan meant "Calculated attributes" not "Calculated  
>> methods", the API for properties (Calculated is a subclass of  
>> Python's builtin property, with a couple of extra fields that  
>> aren't really used). One example is CalendarEventMixin.endTime,  
>> which is calculated from the startTime and duration attributes.
>>
>> See: parcels/osaf/pim/items.py, lines 64--80 for the  
>> implementation, parcel/osaf/pim/calendar/Calendar.py for some code  
>> where it's used.
> I'll add that two of the 'extra fields that aren't used' are used:
> - there's a schema type, allowing a Calculated attribute to be  
> presented using an attribute editor -- the attribute editor  
> mechanism requires type information to pick which editor should be  
> used.

Oh, right, of course. I retract my erroneous clause above :).

> - there's a list of dependent attributes, allowing us to set up  
> item/attribute notifications to keep things up to date in the UI.  
> If we use Calculateds for indexing, we might need the repository to  
> hook into this so that indexes get updated when dependent  
> attributes change - we'll talk about this more later.

Interesting: What parts of the UI (tables, attribute editors, ...)  
set up these notifications?

--Grant



More information about the chandler-dev mailing list