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

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

Reply via email to