[Dev] mapping python back to the repository

Grant Baillie grant at osafoundation.org
Tue Feb 15 10:14:45 PST 2005


I believe you want to call kind.newItem() (You supply a name and a 
parent in the repository).

--Grant

On Feb 15, 2005, at 10:09 AM, Alec Flett wrote:

>  Right now, we have a way of mapping a repository kind back to a 
> python class - you just say <classes ...>*python class*</classes>
>
>  The problem I'm running into now is that I want to create an instance 
> of a python class and an entry in the repository, but I'm not really 
> sure what the proper way is. Specifically, I want to create an 
> ItemCollection, but when I say
>
>  c = ItemCollection()
>
>  I'm finding that the repository work doesn't get done - the 
> attributes on the object don't get hooked up right, etc. I guess this 
> makes sense though - how would it know which Kind to map the class to?
>
>  So, is there a better way to create Items? I see some stuff in Kind, 
> but I can't find any docs on the proper way to create an item of a 
> given kind..
>
>  Alec
>  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Open Source Applications Foundation "Dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/dev



More information about the Dev mailing list