links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
projectsMenuOn: aDockingBar
Last updated at 5:26 am UTC on 28 April 2019
projectsMenuOn: aDockingBar

	aDockingBar addItem: [ :item |
			contents: 'Projects' translated;
			addSubMenu: [ :menu | 
				self newProjectMenuItemOn: menu.
				menu addLine.
					saveProjectMenuItemOn: menu;
					loadProjectMenuItemOn: menu.
				menu addLine.
					previousProjectMenuItemOn: menu;
					jumpToProjectMenuItemOn: menu ] ]

newProjectMenuItemOn: menu

	Project allSubclasses do: [ :each |
		menu addItem: [ :item | 
				contents: ('New ', each name) translated;
				help: ('Start a new ', each name) translated;
				target: self;
				selector: #newProject:;
				arguments: { each } ] ] 

After you have added a new subclass to MorphicProject you need to hide and show TheWorldMenuDockingBar instance for the menu to be updated.

See also

Subclassing MorphicProject, TheWorldMenu and PasteUpMorph