On 28 Mar, 2007, at 16:52, Morgen Sagen wrote:
Just testing you. :-)
Thanks for pointing out the error, Grant.
Actually, after I sent that, I realized it's actually
withItemForUUID, not withItemByUUID. Hopefully, there will be no more
corrections to this one word :).
--Grant
On Mar 28, 2007, at 4:50 PM, Grant Baillie wrote:
A minor correction: The @self.loadItemByUUID(...) line below
should be
@self.withItemByUUID(record.uuid, pim.ContentItem,
displayName=record.title, createdOn=createdOn)
--Grant
On 28 Mar, 2007, at 13:20, Morgen Sagen wrote:
...
2) decorator: if your importer actually needs access to the item
being loaded/created, you'll need to write a nested method which
accepts the item as its argument, and decorate that method with
self.withItemForUUID( )
For example, in the ItemRecord.importer, what was:
item = self.loadItemByUUID(record.uuid, pim.ContentItem,
displayName=record.title, createdOn=createdOn)
if record.triage != "" and record.triage not in emptyValues:
[... snip ...]
item.doAutoTriageOnDateChange = (auto == "1")
becomes:
@self.loadItemByUUID(record.uuid, pim.ContentItem,
displayName=record.title, createdOn=createdOn)
def do(item):
if record.triage != "" and record.triage not in emptyValues:
[... snip ...]
item.doAutoTriageOnDateChange = (auto == "1")
...
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev