That�s exactly the reason why one was introduced in Spec :)

Ben

On 05 Mar 2014, at 12:05, Pharo4Stef <pharo4Stef@free.fr> wrote:

When I see this code, I think that we are missing a MenuGroupSpec to work with MenuSpec
and we could also rename PluggableMenuSpec into MenuSpec.


buildMenuSpec: aMenu
"recursiveley build the menu spec aMenu passed as argument"
self itemList
ifNotNil: [:l |
| m |
m := isGroup
ifFalse: [PluggableMenuSpec withModel: nil]
ifTrue: [aMenu].
(l reject: [:i | i precondition value not]) do: [:i | i buildMenuSpec: m].
isGroup ifFalse: [self spec subMenu: m]].
isGroup
ifTrue: [self spec separator ifTrue: [self itemList ifNotNil: [self itemList last spec separator: true]]]
ifFalse: [aMenu items add: self spec]


https://pharo.fogbugz.com/default.asp?13044