[Chandler-dev] When to use proxied items vs unproxied items?
Grant Baillie
grant at osafoundation.org
Tue Mar 6 09:40:17 PST 2007
On 6 Mar, 2007, at 08:15, Reid Ellis wrote:
> These are modelled on the numerous other event-handling methods in
> the FocusEventHandlers class. My (hopefully simple) question is:
> why do we use __getProxiedSelectedItems() for event handlers (which
> ends up calling Block.getProxiedItem()), but __getSelectedItems()
> (which does not call that function) for the UpdateUI methods?
> Shouldn't they both be using the proxy version?
If you're just getting attributes of an item for UI updates, you
probably don't need the proxy. [The only time the proxy makes a
difference for getters is while the recurrence dialog is showing.
Then, in most cases, it allows the UI to show items as they will
appear if you go ahead with the change.]
If you're setting item attributes, you should use the proxy because
that will record edit/update changes, and also show the recurrence
dialog where appropriate.
--Grant
More information about the chandler-dev
mailing list