Dominik Huber wrote: > We should have an application/framework-level hook within the site.zcml > that is processed before *-configure.zcml are invoked. > > Problem: A framework package 'b.x' registers a dedicated menu 'b_views'. > A package 'a.x' using 'b.x' should be able to register menu items > refering 'b_views'. The initialisation will fail because 'a.x' is loaded > before 'b.x' and therefore 'a.x' cant register any view to 'b_views' > because the menu does not exists yet. > > Proposed solution: package includes named *-app.zcml will be invoked > before the regular *-configure.zcml package includes (Compare example > site.zcml below) > > Any objections?
That might be a reasonable band-aid. However, directives ought to have no load-time dependencies on other directives. The configuration directives should defer any interconnections and registration until the whole configuration is loaded. In your specific example, a.x should be able to register views on any menu, regardless of whether b_views has been loaded yet. Shane _______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com