Re: [Zope3-Users] How do I get the Interfaces in right order?

2005-08-01 Thread Stephan Richter
On Monday 18 July 2005 12:49, Johan Carlsson wrote:
> But how can I control that order?
>
> Also, which maybe is more of a question for the zope3 developers
> which I assume is on this list as well :-), woundn't it be a
> good idea to have someway of overriding the order of menus.
> Maybe just swaping the order of the sorting items from:

The order of menu items can also be controlled using the "order" attribute.

> (ifaces.index(item._for or Interface), item.order, item.title, item)
>
> to:
>
> (item.order, ifaces.index(item._for or Interface), item.title, item)

You really do not want to mess with the interface order, ever!

> But order doesn't seem to be implemented everywhere?
> For instance not all ZCML directives that implement the menu (MenuField)
> implemets the order field?

Then don't use those menu attributes and write out the menuItem directive 
explictely.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] How do I get the Interfaces in right order?

2005-07-18 Thread Johan Carlsson


Apparently menus are sorted first on the order Interfaces are defined 
(at least as returned by providedBy(removeSecurityProxy(object)).__iro__).


But how can I control that order?

Also, which maybe is more of a question for the zope3 developers
which I assume is on this list as well :-), woundn't it be a
good idea to have someway of overriding the order of menus.
Maybe just swaping the order of the sorting items from:

(ifaces.index(item._for or Interface), item.order, item.title, item)

to:

(item.order, ifaces.index(item._for or Interface), item.title, item)

But order doesn't seem to be implemented everywhere?
For instance not all ZCML directives that implement the menu (MenuField)
implemets the order field?

Regards,
Johan

--
Johan Carlsson  Tel: + 46 8 31 24 94
Colliberty  Mob: + 46 70 558 25 24
Torsgatan 72Email: [EMAIL PROTECTED]
SE-113 37 STOCKHOLM

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users