Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
appsMenuOn: aDockingBar
Last updated at 6:29 am UTC on 13 November 2017
TheWorldMainDockingBar creates an apps menu with the code below. TheWorldMenu registry is used to do this.

appsMenuOn: aDockingBar
	"Create a menu with the registered apps"

	aDockingBar addItem: [ :item |
		item
			contents: 'Apps' translated;
			subMenuUpdater: self
			selector: #listAppsOn: ]




listAppsOn: menu
	"Update the apps list in the menu"

	| args |
	TheWorldMenu registeredOpenCommands do:[:spec|
		args := spec second.
		menu addItem: [ :item |
			item
				contents: spec first translated;
				target: args first;
				selector: args second].
	].