[Dev] How to fill in a Text attribute

Jeffrey Harris jeffrey at skyhouseconsulting.com
Fri Apr 23 17:20:53 PDT 2004


Hi Folks,

I just committed code that reads a mapping from an XML dialect to 
describe how external data should be imported into Chandler.  The Test 
-> Import Contacts from Outlook CSV menu item should act exactly the 
same, but the machinery's a little different now.

As I import data, I need to create Text Lobs.  I don't exactly 
understand how to do this.

There's code in the repository unit tests that illuminates the fact that 
I should use the writer API to talk to the Text Lob.  But when I try:

k=rep.find("//parcels/OSAF/contentmodel/notes/Note")
n=k.newItem(None, None)
n.body.getWriter()

it fails, because n.body is empty.

If I do n.body=repository.utils.Lob.Text(), then I can write to it, but 
when I commit the repository, it won't allow repository.utils.Lob.Text 
instances for the body Attribute.

I'm sure I'm missing something obvious, please enlighten me!

Sincerely,
Jeffrey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://lists.osafoundation.org/pipermail/dev/attachments/20040423/9c6a4305/signature.bin


More information about the Dev mailing list