[squeak-dev] Re: The Inbox: Morphic-cbr.392.mcz Breaks PopUpMenu

Casey Ransberger casey.obrien.r at gmail.com
Sun Apr 4 04:02:39 UTC 2010


I don't think I removed that method; please be aware that garbage in the
inbox mangled the diff for that commit. It only contained some changes that
moved items out of the world menu into the docking bar. The rest was a bad
diff against something else that was left in the inbox.

I don't believe I removed that method; if I did, it was unintentional.

This is what I actually checked in (AFAIK)...

=============== Diff against Morphic-tfel.396 ===============

Item was changed:
 ----- Method: TheWorldMenu>>buildWorldMenu (in category 'construction')
-----
 buildWorldMenu
       "Build the menu that is put up when the screen-desktop is clicked on"
       | menu |
       menu := MenuMorph new defaultTarget: self.
       menu commandKeyHandler: self.
       self colorForDebugging: menu.
       menu addStayUpItem.
       self makeConvenient: menu.
       Smalltalk at: #ServiceGUI ifPresent:[:sgui|
               sgui worldMenu: menu.
               sgui onlyServices ifTrue: [^ menu].
       ].
       self addProjectEntries: menu.
       myWorld addUndoItemsTo: menu.
       self addRestoreDisplay: menu.
       self addUtilities: menu.
       self addObjectsAndTools: menu.
       self addPrintAndDebug: menu.
       self addSaveAndQuit: menu.
       ^ menu!

Item was changed:
 ----- Method: TheWorldMainDockingBar>>extrasMenuOn: (in category
'construction') -----
 extrasMenuOn: aDockingBar

       aDockingBar addItem: [ :it|
               it      contents: 'Extras' translated;
                       addSubMenu: [:menu|
                               menu addItem:[:item|
                                       item
                                               contents: 'Recover Changes'
translated;
                                               help: 'Recover changes after
a crash' translated;
                                               icon: MenuIcons
smallHelpIcon;
                                               target: ChangeList;
                                               selector: #browseRecentLog].
                               menu addLine.
                               menu addItem:[:item|
                                       item
                                               contents: 'Window Colors'
translated;
                                               help: 'Changes the window
color scheme' translated;
                                               addSubMenu:[:submenu| self
windowColorsOn: submenu]].
                               menu addItem:[:item|
                                       item
                                               contents: 'Set Author
Initials' translated;
                                               help: 'Sets the author
initials' translated;
                                               target: Utilities;
                                               selector:
#setAuthorInitials].
                               menu addItem:[:item|
                                       item
                                               contents: 'Restore Display
(r)' translated;
                                               help: 'Redraws the entire
display' translated;
                                               target: World;
                                               selector:
#restoreMorphicDisplay].
                               menu addItem:[:item|
                                       item
                                               contents: 'Rebuild Menus'
translated;
                                               help: 'Rebuilds the menu bar'
translated;
                                               target:
TheWorldMainDockingBar;
                                               selector: #updateInstances].
                               menu addLine.
                               menu addItem:[:item|
                                       item
                                               contents: 'Start Profiler'
translated;
                                               help: 'Starts the profiler'
translated;
                                               target: self;
                                               selector:
#startMessageTally].
                               menu addItem:[:item|
                                       item
                                               contents: 'Collect Garbage'
translated;
                                               help: 'Run the garbage
collector and report space usage' translated;
                                               target: Utilities;
                                               selector:
#garbageCollectAndReport].
                               menu addItem:[:item|
                                       item
+                                               contents: 'Purge Undo
Records' translated;
+                                               help: 'Save space by
removing all the undo information remembered in all projects' translated;
+                                               target: CommandHistory;
+                                               selector: #resetAllHistory].
+                               menu addItem:[:item|
+                                       item
                                               contents: 'VM statistics'
translated;
                                               help: 'Virtual Machine
information' translated;
                                               target: self;
                                               selector: #vmStatistics].
+                               menu addLine.
+                               menu addItem:[:item|
+                                       item
+                                               contents: 'Graphical
Imports' translated;
+                                               help: 'View the global
repository called ImageImports; you can easily import external graphics into
ImageImports via the FileList' translated;
+                                               target: (Imports default);
+                                               selector: #viewImages].
+                               menu addItem:[:item|
+                                       item
+                                               contents: 'Standard Graphics
Library' translated;
+                                               help: 'Lets you view and
change the system''s standard library of graphics' translated;
+                                               target: ScriptingSystem;
+                                               selector:
#inspectFormDictionary].
+                               menu addItem:[:item|
+                                       item
+                                               contents: 'Annotation Setup'
translated;
+                                               help: 'Click here to get a
little window that will allow you to specify which types of annotations, in
which order, you wish to see in the annotation panes of browsers and other
tools' translated;
+                                               target: Preferences;
+                                               selector: #editAnnotations].
                       ] ]!

Item was changed:
 ----- Method: TheWorldMenu>>addUtilities: (in category 'construction')
-----
 addUtilities: menu
       Preferences simpleMenus ifFalse: [
               self
                       fillIn: menu
                       from: {
                               { 'open...'. { self. #openWindow } }.
                               { 'windows...'. { self. #windowsDo } }.
                               { 'changes...'. { self. #changesDo } }
                       } ].
       self
               fillIn: menu
               from: {
+ "                     { 'help...'. { self. #helpDo }. 'puts up a menu of
useful items for updating the system, determining what version you are
running, and much else' }."
-                       { 'help...'. { self. #helpDo }. 'puts up a menu of
useful items for updating the system, determining what version you are
running, and much else' }.
                       { 'appearance...'. { self. #appearanceDo }. 'put up a
menu offering many controls over appearance.' }
               }.
       Preferences simpleMenus ifFalse: [
               self
                       fillIn: menu
                       from: {
                               { 'do...'. { Utilities. #offerCommonRequests
}. 'put up an editible list of convenient expressions, and evaluate the one
selected.' }
                       } ]!

Item was changed:
 ----- Method: TheWorldMainDockingBar>>helpMenuOn: (in category
'construction') -----
 helpMenuOn: aDockingBar

       aDockingBar addItem: [ :it |
               it      contents: 'Help' translated;
                       addSubMenu: [ :menu |  'Todo'.
                               menu addItem:[:item|
                                       item
                                               contents: 'Online Resources'
translated;
                                               help: 'Online resources for
Squeak' translated;
                                               target: self;
                                               selector:
#showSqueakResources ].
                               menu addItem:[:item|
                                       item
                                               contents: 'Keyboard
Shortcuts' translated;
                                               help: 'Keyboard bindings used
in Squeak' translated;
                                               target: Utilities;
                                               selector: #openCommandKeyHelp
].
+                               menu addItem:[:item|
+                                       item
+                                               contents: 'Font Size
Summary' translated;
+                                               help: 'Font size summary
from the old Squeak 3.10.2 help menu.' translated;
+                                               target: TextStyle;
+                                               selector: #fontSizeSummary
].
+                               menu addItem:[:item|
+                                       item
+                                               contents: 'Useful
Expressions' translated;
+                                               help: 'Useful expressions
from the old Squeak 3.10.2 help menu.' translated;
+                                               target: Utilities;
+                                               selector:
#openStandardWorkspace ].
                       ]].!

Item was changed:
 ----- Method: TheWorldMenu>>addObjectsAndTools: (in category
'construction') -----
 addObjectsAndTools: menu
       self
               fillIn: menu
               from: {
                       nil.
                       { 'objects (o)'. { #myWorld. #activateObjectsTool }.
'A tool for finding and obtaining many kinds of objects' }.
                       { 'new morph...'. { self. #newMorph }. 'Offers a
variety of ways to create new objects' }.
                       nil.
                       { 'authoring tools...'. { self. #scriptingDo }. 'A
menu of choices useful for authoring' }.
                       { 'playfield options...'. { self. #playfieldDo }. 'A
menu of options pertaining to this object as viewed as a playfield' }.
                       { 'flaps...'. { self. #flapsDo }. 'A menu relating to
use of flaps.  For best results, use "keep this menu up"' }.
                       { 'projects...'. { self. #projectDo }. 'A menu of
commands relating to use of projects' }.
+                       { 'telemorphic...' . {self. #remoteDo}.  'commands
for doing multi-machine "telemorphic" experiments'}.
                       nil
               }!


On Sat, Apr 3, 2010 at 1:22 PM, glenpaling <glenpaling at rogers.com> wrote:

>
> Removal of morphicStartUpWithCaption:icon:at:allowKeyboard: from PopUpMenu
> breaks StandardFileMenu (try:  StandardFileMenu oldFile). Perhaps you
> removed it because it has no senders. That's because the selector is
> created
> from the concatenation of 'morphic' and
> startUpWithCaption:icon:at:allowKeyboard in Project (see below). It was
> recently added by David T. Lewis to manage Morphic and MVC compatibility.
>
> dispatchTo: requestor addPrefixAndSend: baseSelector withArguments:
> arguments
>        "Sender wants to perform a method with dependencies on the type of
> project.
>        Dispatch to an appropriate method for the current project.
>
>        This method is a workaround for lack of proper ToolBuilder support
> in the
> sender,
>        and should be eliminated when possible (dtl Feb 2010)"
>
>        | selector |
>        "Flag target selectors to help identify senders"
>        self flag: #mvcOpenLabel:in: .
>        self flag: #morphicOpenLabel:in: .
>        self flag: #mvcStartUpLeftFlush .
>        self flag: #morphicStartUpLeftFlush .
>        self flag: #mvcStartUpWithCaption:icon:at:allowKeyboard: .
>        self flag: #morphicStartUpWithCaption:icon:at:allowKeyboard: .
>        self flag: #mvcOpen: .
>        self flag: #morphicOpen: .
>        self flag: #mvcOpen .
>        self flag: #morphicOpen .
>
>        selector := (self selectorPrefixForDispatch, baseSelector) asSymbol.
>        ^ requestor perform: selector withArguments: argumentsglenpaling@
> ...
> commits-2 wrote:
> >
> > A new version of Morphic was added to project The Inbox:
> > http://source.squeak.org/inbox/Morphic-cbr.392.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Morphic-cbr.392
> > Author: cbr
> > Time: 26 March 2010, 1:38:37.423 am
> > UUID: d2ec5332-d31e-40e5-a5b4-f896cea50f20
> > Ancestors: Morphic-mha.391
> >
> > I find it irksome that we have two help menus (one in the main docking
> > bar, one in the world menu.) I also find it irksome that there's so much
> > stuff in the help menu that's in the world menu that's not really
> > help-related.
> >
> > I moved the stuff that's actually help (except for "world menu help"
> which
> > really isn't that helpful) out of the world menu and into the docking
> bar.
> > I took everything else that wasn't already exposed somewhere and put it
> in
> > the Extras menu on the docking bar.
> >
> > I moved telemorphic up to the top of the world menu because I don't know
> > what it's for, because it pops a submenu that wants self to be an
> instance
> > of TheWorldMenu, and because I didn't really care to mess with
> > transplanting it.
> >
> > BIG snip
> >
> > Item was removed:
> > - ----- Method:
> > PopUpMenu>>morphicStartUpWithCaption:icon:at:allowKeyboard: (in category
> > '*Morphic-Menus') -----
> > - morphicStartUpWithCaption: captionOrNil icon: aForm at: location
> > allowKeyboard: aBoolean
> > -     "Display the menu, with caption if supplied. Wait for the mouse
> button
> > to go down, then track the selection as long as the button is pressed.
> > When the button is released,
> > -     Answer the index of the current selection, or zero if the mouse is
> not
> > released over  any menu item. Location specifies the desired topLeft of
> > the menu body rectangle. The final argument indicates whether the menu
> > should seize the keyboard focus in order to allow the user to navigate it
> > via the keyboard."
> > -
> > -     selection := Cursor normal
> > -                             showWhile: [| menuMorph |
> > -                                     menuMorph := MVCMenuMorph from:
> self title: nil.
> > -                                     (captionOrNil notNil
> > -                                                     or: [aForm notNil])
> > -                                             ifTrue: [menuMorph
> addTitle: captionOrNil icon: aForm].
> > -                                     MenuIcons decorateMenu: menuMorph.
> > -                                     menuMorph
> > -                                             invokeAt: location
> > -                                             in: ActiveWorld
> > -                                             allowKeyboard: aBoolean].
> > -     ^ selection!
> >
> >
> >
> >
> --
> View this message in context:
> http://n4.nabble.com/The-Inbox-Morphic-cbr-392-mcz-tp1691850p1750456.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100403/946e3727/attachment.htm


More information about the Squeak-dev mailing list