Re: [Zope-dev] Is there a function to get the object type?

2006-04-12 Thread Lennart Regebro
On 4/11/06, Takahashi, Michael <[EMAIL PROTECTED]> wrote: > I'm trying to write a function that checks to see if the current object is > a 'Folder'. several ways: isinstance(object, Folder) # does not work in python scripts or object.meta_type == "Folder" # does work in python scripts

RE: [Zope-dev] Is there a function to get the object type?

2006-04-10 Thread Takahashi, Michael
folder." Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: Monday, April 10, 2006 4:43 PM To: zope-dev@zope.org Subject: Re: [Zope-dev] Is there a function to get the object type? On Mon, Apr 10, 2006 at 03:46:41PM -0700,

Re: [Zope-dev] Is there a function to get the object type?

2006-04-10 Thread Paul Winkler
On Mon, Apr 10, 2006 at 03:46:41PM -0700, Takahashi, Michael wrote: > Hi guys, > > I'm trying to write a function that checks to see if the current object > is a 'Folder'. > > I am using this tutorial as a reference: > > http://plone.org/documentation/how-to/pre-populated-folder > > To crea

RE: [Zope-dev] Is there a function to get the object type?

2006-04-10 Thread Takahashi, Michael
would like to know that the current object is a ‘Folder’     Thanks,   Mike     From: Aruna Kathiria [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 3:58 PM To: Takahashi, Michael; zope-dev@zope.org Subject: RE: [Zope-dev] Is there a function to get the object type?   Hello

RE: [Zope-dev] Is there a function to get the object type?

2006-04-10 Thread Aruna Kathiria
Hello: You can get the types from following function. Once you get the list of the types of the object type, you can use it as you want.   ptypes = context.portal_types.objectValues()   sample script to test is:   --- ptypes = context.portal_types.objectValues()