[Dev] Small tweak to parcel loader
John Anderson
john at osafoundation.org
Fri Jun 11 13:05:31 PDT 2004
Suppose I have two attributes:
<Attribute itemName="parentBlock">
<type itemref="docSchema:Block"/>
<cardinality>single</cardinality>
<inverseAttribute itemref="docSchema:Block/childrenBlocks"/>
<defaultValue itemref="None"/>
</Attribute>
<Attribute itemName="childrenBlocks">
<type itemref="docSchema:Block"/>
<cardinality>list</cardinality>
<inverseAttribute itemref="docSchema:Block/parentBlock"/>
<initialValue/>
</Attribute>
I would assume that block.parent block would never throw an
AttributeNotFound exception. However, in my code it does. Is this a bug
or is the data model too complicated for me to understand?
John
Morgen Sagen wrote:
> By popular demand: if you want to set the defaultValue or
> initialValue of a list or dict attribute to be an empty list or dict,
> you may now include either "<defaultValue/>" or "<initialValue/>"
> inside that attribute's definition. For example:
>
> <Attribute itemName="listAttr">
> <displayName>List Attribute</displayName>
> <cardinality>list</cardinality>
> <type itemref="String"/>
> <initialValue/>
> </Attribute>
>
> ~morgen
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Open Source Applications Foundation "Dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/dev
More information about the Dev
mailing list