Note that there's a problem currently, that many content item attributes don't have appropriate defaults set up in their parcel.xml Kind descriptions. This leads to separate copies of initialization code in Python (in the app code, as well as clones in unit tests), which is icky. This ickyness is represented by this bug, currently assigned to Jeffrey:

http://bugzilla.osafoundation.org/show_bug.cgi?id=2402

...Bryan


Alec Flett wrote:

Andi Vajda wrote:


When creating an item instance (or a subclass thereof) you need to pass three things:
- a name, which is optional and is useful for debugging
- a parent, which determines where the item lives in the repository
- a kind, which is optional. A kindless item is limited in what it can do
but is useful as a container of other items, its children (see above).

kind.newItem() seems to work for me, but I'm curious in exploring the python-constructor method further, if only to understand how it works:


I've had no luck passing in a view parameter, I still don't get default attribute values from the Kind.. but your last bullet makes me think that I need to pass in a kind manually. You mention that its optional, but if I don't pass one in, what Kind gets hooked up?

Alec

------------------------------------------------------------------------

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

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


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

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

Reply via email to