Re: [Zope] GUF and manage_addGenericUserFolder not working

2000-08-31 Thread Stuart Bishop

On Wed, 30 Aug 2000, Jason Byron wrote:

> Now, *why* does that work?  The function
> manage_addProduct looks like its for adding new
> products under the Control_Panel.  That isn't what
> it's for?
> 
> I don't have to do 
>  
> to use manage_addUserFolder ?

[...]

> legacy=(AccessControl.User.manage_addUserFolder,),

I think the key word here is 'legacy'. I think this was the original
method of adding object instances for all products, but some bright
spark realized that as more products are added this flat name space
gets more and more bloated and name collisions become much more likely.

> Could adding something like this to the GUF fix the
> problem I had and let manage_addGenericUserFolder work
> by itself?

It should work if you really like it that way.

-- 
Stuart Bishop  Work: [EMAIL PROTECTED]
Senior Systems Alchemist   Play: [EMAIL PROTECTED]
Computer Science, RMIT University


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] GUF and manage_addGenericUserFolder not working

2000-08-30 Thread Jason Byron

--- Chris Withers <[EMAIL PROTECTED]> wrote:
> Jason Byron wrote:
> > I try to call the function
> manage_addGenericUserFolder
> > in a DTML Method but I keep getting a NameError
> for
> > it. It's as if Zope can't find the definition.
> 
> Try somethign like the following:
> 
> 
>   params, here)">
> 
> 
> cheers,
> 
> Chris


Hey, that worked! Thanks Chris

Now, *why* does that work?  The function
manage_addProduct looks like its for adding new
products under the Control_Panel.  That isn't what
it's for?

I don't have to do 
 
to use manage_addUserFolder ?


I noticed this in the OFSP stuff.  


from :lib/python/Products/OFSP/__init__.py
line :153

context.registerClass(
AccessControl.User.UserFolder,
   
constructors=(AccessControl.User.manage_addUserFolder,),
icon='images/UserFolder_icon.gif',
   
legacy=(AccessControl.User.manage_addUserFolder,),
)

   
context.registerBaseClass(AccessControl.User.UserFolder,
'User Folder')
context.registerBaseClass(AccessControl.User.User)



Could adding something like this to the GUF fix the
problem I had and let manage_addGenericUserFolder work
by itself?


Jason




__
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] GUF and manage_addGenericUserFolder not working

2000-08-30 Thread Chris Withers

Jason Byron wrote:
> I try to call the function manage_addGenericUserFolder
> in a DTML Method but I keep getting a NameError for
> it. It's as if Zope can't find the definition.

Try somethign like the following:


 


cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )