'From Squeak3.1alpha of 4 February 2001 [latest update: #3714] on 24 February 2001 at 6:38:17 pm'! "Change Set: LeadingBlanks-ar Date: 24 February 2001 Author: Andreas Raab Silently remove all leading blanks when publishing a project."! !EToyProjectRenamerMorph methodsFor: 'as yet unclassified' stamp: 'ar 2/23/2001 20:55'! doOK self validateTheProjectName ifFalse: [^self]. self delete. actionBlock value: (namedFields at: 'projectname') contents string withBlanksTrimmed.! ! !EToyProjectRenamerMorph methodsFor: 'as yet unclassified' stamp: 'ar 2/23/2001 20:53'! validateTheProjectName | proposed | proposed _ (namedFields at: 'projectname') contents string withBlanksTrimmed. proposed size = 0 ifTrue: [ self inform: 'I do need a name for the project'. ^false ]. proposed size > 24 ifTrue: [ self inform: 'Please make the name 24 characters or less'. ^false ]. (Project isBadNameForStoring: proposed) ifTrue: [ self inform: 'Please remove any funny characters from the name'. ^false ]. proposed = theProject name ifTrue: [^true]. (ChangeSorter changeSetNamed: proposed) ifNotNil: [ Utilities inform: 'Sorry that name is already used'. ^false ]. ^true! ! !EToyProjectDetailsMorph methodsFor: 'as yet unclassified' stamp: 'ar 2/23/2001 20:56'! copyOutDetails | newDetails | newDetails _ Dictionary new. self fieldToDetailsMappings do: [ :each | namedFields at: each first ifPresent: [ :field | newDetails at: each second put: field contents string ]. ]. namedFields at: 'projectname' ifPresent: [ :field | newDetails at: 'projectname' put: field contents string withBlanksTrimmed. ]. ^newDetails! !