MenuManager/MenuSpecification

Eric Arseneau eat at huv.com
Thu Aug 3 15:36:53 UTC 2000


Hello all,

I'm not sure someone has covered this before, so here goes an idea and lets
see where it goes.

I want to release some changes I made to the debugger.  I've added a couple
of really useful operations to the context list.  One of them being 'drop to
selected frame'.  This is a very indispensable operation once you get used
to it.  The problem with releasing it is that I have to release changes made
to the menu methods within debugger.  This does not seem a very good way to
release these types of changes.  With some of the packaging/trimming efforts
we are undertaking, dependencies on things that are not necessary will and
have cropped up.

What I am proposing is to define a MenuManager class that allows tools to
'register' an interest in a named menu and to add to it.  We would then
change all of the tools to go through the MenuManager whenever they want a
menu.  Each menu would be broken down into named groups, this would handle
the lines issue.  So a possible interface could be:

	addInterestInMenuNamed: #debugger for: MyClass selector:
#theSelectorWithWhateverArgumentsWeNeed
	addBlock: {some block with necessary args} toMenuNamed: #browser labelled:
'Label' inGroupNamed: #group

Hockey names, but a start.  Another part of the proposal would be to provide
a menu specification interface.  We could have tools provide a
MenuSpecification to the MenuManager.  Then, whenever a tool wanted its
menu, the MenuManager would get all of the specifications for it, merge them
into one, and then render the menu for MVC or Morphic.

Does this sound like the start of a good idea ?  Or am I missing something
and it already exists ?





More information about the Squeak-dev mailing list