[Zope] saving/creating an object to an exsisting folderish object
Allen Huang
swapp0 at yahoo.com
Sun Jan 7 11:07:28 EST 2007
I found the solution... use _.getitem(name)
this took some book flipping through some basic methods of zope modules in 'The Book of ZOPE' by Beehive. A pretty good book for beginners
----- Original Message ----
From: Allen Huang <swapp0 at yahoo.com>
To: zope at zope.org
Sent: Sunday, January 7, 2007 5:00:03 PM
Subject: Re: [Zope] saving/creating an object to an exsisting folderish object
I don't have a problem with manage_addProduct(). I know how it works. Creating objects in a folder is not a problem to me.
My problem is the folderish object which I'm trying to find with a string input.
If you've read my previous message,
the server output error with name.manage_addFile('point', 'a point') because name is a str object and does not have manage_addFile.
I understand this.
But name is an id to an exsisting folder that I want to access and do operation inside.
how would I modify name.manage_addFile('point', 'a point') into a working statement?
----- Original Message ----
From: Andreas Jung <lists at zopyx.com>
To: Allen Huang <swapp0 at yahoo.com>; Zope <zope at zope.org>
Sent: Sunday, January 7, 2007 4:06:27 PM
Subject: Re: [Zope] saving/creating an object to an exsisting folderish object
--On 7. Januar 2007 00:02:21 -0800 Allen Huang <swapp0 at yahoo.com> wrote:
> 'name' is a string obj
> I have a exsisting folder
>
> name == folder.getId()
>
> say I want to use manage_addFile('point', 'a point') into this folder
> with the getId() == name
>
> but I can't do name.manage_addFile('point', 'a point') because 'name' is
> a str object
>
> so how do I create a file inside a folder whose id is 'name'?
>
>
here is a german FAQ:
<http://www.zope.de/dokumentation/faqs/entwicklung/PythonScripts/add_product/?searchterm=manage_add*>
Google for manage_addProduct() or search on zope.org
-aj
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Zope maillist - Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070107/61260126/attachment.htm
More information about the Zope
mailing list