Hi all... I am working on Celeste to gain submenu on some area. I cannot build a proper submenu. I have used code like this inside Celeste>>addGeneralMenuOptionsTo: aMenu ... subMenu := (MenuMorph entitled:'Submenu') defaultTarget: (aMenu defaultTarget). [...adding submenu objects...] aMenu add: (self category) subMenu: subMenu
When the menu is renderer, I got a complain by MenuMorph>>setInvokingView: (see below)
In the line MenuMorph>>setInvokingView: {[:item | item arguments isEmpty ifTrue: [item
item arguments return nil (it seems item is my dear submenu or something like that).
How is the right way to init a SubMenu? Can you help me? Thanks :)
5 October 2004 7:09:34 pm
VM: Win32 - a SmalltalkImage Image: Squeak3.8alpha [latest update: #5990]
SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir C:\gio\netDisk\celeste Trusted Dir C:\gio\netDisk\celeste\Gio Untrusted Dir C:\My Squeak\Gio
UndefinedObject(Object)>>doesNotUnderstand: #isEmpty Receiver: nil Arguments and temporary variables: aMessage: isEmpty Receiver's instance variables: nil
[] in MenuMorph>>setInvokingView: {[:item | item arguments isEmpty ifTrue: [item arguments: (Array with: ...]} Arguments and temporary variables: invokingView: a PluggableListMorphByItem(1550) item: a MenuItemMorph(704)'.sent.'
Array(SequenceableCollection)>>do: Receiver: #(a MenuItemMorph(606)'fetch mail' a MenuItemMorph(826)'send queued mail' a MenuItemMorph(...etc... Arguments and temporary variables: aBlock: [] in MenuMorph>>setInvokingView: {[:item | item arguments isEmpty if...etc... index: 4 indexLimiT: 24 Receiver's instance variables: #(a MenuItemMorph(606)'fetch mail' a MenuItemMorph(826)'send queued mail' a MenuItemMorph(...etc...
MenuMorph>>setInvokingView: Receiver: a MenuMorph(268) Arguments and temporary variables: invokingView: a PluggableListMorphByItem(1550) item: a MenuItemMorph(704)'.sent.' Receiver's instance variables: bounds: 0@0 corner: 40@10 owner: nil submorphs: #(a MenuItemMorph(606)'fetch mail' a MenuItemMorph(826)'send queued ...etc... fullBounds: nil color: (Color r: 0.97 g: 0.97 b: 0.97) extension: a MorphExtension (3624) [other: (layoutPolicy -> a TableLayout) (co...etc... borderWidth: 2 borderColor: #raised defaultTarget: a ScaffoldingCeleste selectedItem: nil stayUp: false popUpOwner: nil activeSubMenu: nil
--- The full stack --- UndefinedObject(Object)>>doesNotUnderstand: #isEmpty [] in MenuMorph>>setInvokingView: {[:item | item arguments isEmpty ifTrue: [item arguments: (Array with: ...]} Array(SequenceableCollection)>>do: MenuMorph>>setInvokingView: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PluggableListMorphByItem(ScrollPane)>>yellowButtonActivity: PluggableListMorphByItem(ScrollPane)>>scrollBarMenuButtonPressed: PluggableListMorphByItem(ScrollPane)>>vScrollBarMenuButtonPressed: [] in ScrollBar>>menuButtonMouseDown: {[:sel | menuSelector := sel. model perform: sel with: event]} ScrollBar(MorphicModel)>>use:orMakeModelSelectorFor:in: ScrollBar>>menuButtonMouseDown: EventHandler>>send:to:withEvent:fromMorph: EventHandler>>mouseDown:fromMorph: RectangleMorph(Morph)>>mouseDown: RectangleMorph(Morph)>>handleMouseDown: MouseButtonEvent>>sentTo: RectangleMorph(Morph)>>handleEvent: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>dispatchEvent:with: RectangleMorph(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>dispatchEvent:with: ScrollBar(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>dispatchEvent:with: PluggableListMorphByItem(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>dispatchEvent:with: SystemWindow(Morph)>>processEvent:using: MorphicEventDispatcher>>dispatchMouseDown:with: MorphicEventDispatcher>>dispatchEvent:with: PasteUpMorph(Morph)>>processEvent:using: PasteUpMorph>>processEvent:using: PasteUpMorph(Morph)>>processEvent: HandMorph>>sendEvent:focus:clear: HandMorph>>sendMouseEvent: HandMorph>>handleEvent: HandMorph>>processEvents [] in WorldState>>doOneCycleNowFor: {[:h | ActiveHand := h. h processEvents. capturingGesture := capturingGest...]} Array(SequenceableCollection)>>do: WorldState>>handsDo: WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: PasteUpMorph>>doOneCycle [] in Project class>>spawnNewProcess {[[World doOneCycle. Processor yield. false] whileFalse. nil]} [] in BlockContext>>newProcess {[self value. Processor terminateActive]}
squeak-dev@lists.squeakfoundation.org