On Fri, 2008-10-10 at 21:17 +0200, Roger Ineichen wrote:

> I do not fully understand what the codes does but this does not work:
> ontObj.parentArchetype = ''
> Because it will set an empty string but an IObjectRef is needed.
> Thats' not valid, just let it be, don't set anything else then
> an IObjectRef as value.

Unfortuuately you are looking at older code (before I really began
testing this section).

The code that is failing is:
    oid = ObjectId(unicode(parsed_adl.archetype[1]))
    ontObj.parentArchetype = ObjectRef(oid,u'openehr',u'ARCHETYPE')

where oid is an instance of ObjectId.

Sorry that the servers are down right now and will be all weekend.  

> Also this doesn't work:


> In the sample above just remove the else condition.
> The object whould return an empty list as defined
> in default anyway.


> btw,
> I really dislike this invalid schema definitions. With
> invalid I mean the default value is not a vaild value
> if ou try to store them. 
> because of:
> required=True
> default=[]
> This is a combination which is not valid and it's not possible 
> to store the default value again.

Thanks.  This is so obvious now that you pointed it out. :-)
I'll look around for more of these.

Thanks and have a great weekend.

I'll be busy Grokifying this application.


Timothy Cook, MSc
Health Informatics Research & Development Services
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook 
Skype ID == timothy.cook 
*You may get my Public GPG key from  popular keyservers or   *
*from this link http://timothywayne.cook.googlepages.com/home*

Attachment: signature.asc
Description: This is a digitally signed message part

Zope3-users mailing list

Reply via email to