[Zope] PROBLEM(100) Init Ambiguous .. "manage_main" != "manage_editTabsForm

Andy McKay andym@ActiveState.com
Thu, 16 Aug 2001 09:23:49 -0700


>From post on zope-dev:

[snip]
On Friday 27 July 2001 11:20, Chris Withers wrote:
> Hi Shane,
>
> I'm seeing this with Squishdot on Zope 2.4.0:
> > 2001-07-24T16:42:28 PROBLEM(100) Init Ambiguous name for method of
> > Products.Squi
> > shdot.Posting.Posting: "manage_editForm" != "manage_main"
>
> I saw you answer a question about this with another product, and I was
> wondering what you recommend I do to fix the problem.
>
> The offending line looks line in Posting.py looks like:
>
>     manage_main = manage_editForm

Either manage_main or manage_editForm is protected by a permission,
right?  Whichever it is, that's the "official" name for the method.
Assuming it's "manage_editForm", you would add a line like this below the
line you quoted:

manage_editForm._setName("manage_editForm")

That way there's no ambiguity.

Shane

[/snip]

Cheers.
--
  Andy McKay.


----- Original Message -----
From: "hans" <hans@beehive.de>
To: "Mail zope.org" <zope@zope.org>
Cc: "Mitchell L Model" <mlm@acm.org>
Sent: Thursday, August 16, 2001 10:07 AM
Subject: [Zope] PROBLEM(100) Init Ambiguous .. "manage_main" !=
"manage_editTabsForm


> i've sent mlm my private Tabs product (read digest 95)
> ##### File Tabs.py
> default_title='AdvanTabs'  # also used as meta_type
> from ImageFile import ImageFile  # button images
> from Globals   import DTMLFile  #
> from OFS       import SimpleItem #
> import string   # atoi
> from StringIO import StringIO # save/save, [un]pickle into string
> import pickle   # load/save, from/into client file,
>
> class Tabs(SimpleItem.SimpleItem):
>
>   """keeps a treelike tabs-structure"""
>   # Tabs: [ ...{'num':string, 'lbl':string, 'url':string,
> 'sub':Tabs},...]
>    SEP = '.' # separator
>
>    meta_type=default_title
>
>    manage_options = (
>          { 'label': 'Edit', 'action':'manage_editTabsForm' },
>          { 'label': 'Tabs', 'action':'manage_adminTabsForm' },
>          { 'label': 'View', 'action':'manage_viewTabsForm' },
>    ) + SimpleItem.SimpleItem.manage_options
>
>  def __init__(self, id, title=default_title):
>        """init new instance of Tabs"""
>        ...
>  manage_main = \
>  manage_editTabsForm = DTMLFile('manage_editTabsForm', globals() )
>  # """edit Tabs, a) set title, load tabstree from client, c) save
> tabstree to client"""
>
>  def manage_editTabs(self, title='', REQUEST=None):
>       """edit Tabs, set Title"""
> --------------------------------------------------------------------------
-
>
> and mlm mails me:
> >Problem?  I stopped Zope, expanded the .zip file in the Products
> >directory, restarted Zope, and got:
>
> >2001-08-16T15:16:59 PROBLEM(100) Init Ambiguous name for method of
> >Products.AdvanTabs.Tabs.Tabs: "manage_main" != "manage_editTabsForm
>
> >Suggestions?
>
> i never had that one. sorry, i dont have any idea. whats going on?
> (basti tells me, its a zope 2.4 error, maybe mlm uses 2.4, i dont)
> but again sorry im just about to take my free time *very* soon.
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> 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 )
>