Could you provide a way to reproduce it ?
Because debugging from within Mail is quite tedious :P
BenOn 11 Dec 2013, at 10:20, St�phane Ducasse <stephane.ducasse@inria.fr> wrote:Hi
I got a bug with menu (I'm trying to reproduce it but this is a real bug)
because in
interpretRegistration: aRegistration
item enabled
ifNil: [ node enabled: boolean not ]
ifNotNil: [:boolean | node enabled: boolean ].
I will not comment on the fact that enabled should return a boolean
but the problem is that node does not understand enabled:
item enabled
ifNil: [ node enabledBlock: item enabledBlock ]
node is a MenuRegistration and items is PragmaMenuAndShortcutRegistrationItem
ifNotNil: [:boolean | node enabled: boolean ].
And not of course does not understand enabledBlock:
interpretRegistration: aRegistration
| root |
root := MenuRegistration owner: self.
aRegistration items do: [:item || node |
node := item group
ifNil: [ root item: item item ]
ifNotNil: [:grp | root group: grp ].
item with
ifNotNil: [:block || old |
old := aRegistration currentRoot.
aRegistration currentRoot: node name.
[ node with: block ] ensure: [ aRegistration currentRoot: old ]]
ifNil: [
item action
ifNil: [
node
target: item target;
arguments: item arguments;
selector: item selector ]
ifNotNil:[
node
action: item action ]].
node
keyText: item keyText;
help: item help;
icon: item icon;
order: item order;
parent: item parent.
item enabled
ifNil: [ node ]
ifNotNil: [:boolean | node enabled: boolean ].
item label
ifNotNil: [ node label: item label ].
item default ifNotNil: [ :d |
node label: node label, ' (', d asString, ')'].
item isWithSeparatorAfter
ifTrue: [ node withSeparatorAfter ]]