Just testing you.  :-)

Thanks for pointing out the error, Grant.

~morgen


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

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

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

Reply via email to