A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ul.496.mcz ==================== Summary ==================== Name: System-ul.496 Author: ul Time: 14 September 2012, 2:54:39.996 pm UUID: 762fe830-0bfc-f545-b636-7811666df4ab Ancestors: System-ul.495 - redirect author related methods from Utilities to Author - removed AuthorInitials and AuthorName from Utilities =============== Diff against System-ul.495 =============== Item was changed: Object subclass: #Utilities instanceVariableNames: '' + classVariableNames: 'CommonRequestStrings LastStats RecentSubmissions ScrapsBook UpdateDownloader UpdateUrlLists' - classVariableNames: 'AuthorInitials AuthorName CommonRequestStrings LastStats RecentSubmissions ScrapsBook UpdateDownloader UpdateUrlLists' poolDictionaries: '' category: 'System-Support'! !Utilities commentStamp: '<historical>' prior: 0! A repository for general and miscellaneous utilities; much of what is here are in effect global methods that don't naturally attach to anything else. 1/96 sw! Item was changed: ----- Method: Utilities class>>authorInitials (in category 'identification') ----- authorInitials "Answer the initials to be used to identify the current code author. " + ^Author initials! - [AuthorInitials isEmpty] whileTrue: [self setAuthorInitials]. - ^ AuthorInitials! Item was changed: ----- Method: Utilities class>>authorInitialsPerSe (in category 'identification') ----- authorInitialsPerSe "Answer the currently-prevailing author initials, such as they, empty or not" + ^Author initialsPerSe! - ^ AuthorInitials! Item was changed: ----- Method: Utilities class>>authorName (in category 'identification') ----- authorName + + ^Author username! - AuthorName ifEmpty: [self setAuthorName]. - ^ AuthorName! Item was changed: ----- Method: Utilities class>>authorName: (in category 'identification') ----- authorName: aString + + Author current username: aString! - AuthorName := aString! Item was changed: ----- Method: Utilities class>>authorNamePerSe (in category 'identification') ----- authorNamePerSe + ^Author usernamePerSe! - ^ AuthorName! Item was changed: ----- Method: Utilities class>>changeStamp (in category 'identification') ----- changeStamp + + ^Author changeStamp! - "Answer a string to be pasted into source code to mark who changed it and when." - ^ self authorInitials , ' ' , Date today mmddyyyy, ' ', - ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 5)! Item was changed: ----- Method: Utilities class>>changeStampPerSe (in category 'identification') ----- changeStampPerSe + + ^Author changeStampPerSe! - "Answer a string to be pasted into source code to mark who changed it and when." - ^String streamContents: - [ : stream | - self authorInitialsPerSe isEmptyOrNil - ifTrue: [ 'ยท' ] - ifFalse: [ self authorInitialsPerSe ]. - stream - space ; - nextPutAll: Date today mmddyyyy ; - space. - (String streamContents: - [ : s | - Time now - print24: true - on: s ]) - copyFrom: 1 - to: 5 ]! Item was changed: ----- Method: Utilities class>>setAuthorInitials (in category 'identification') ----- setAuthorInitials "Put up a dialog allowing the user to specify the author's initials. " + ^Author current requestAndSetInitials! - self setAuthorInitials: - (UIManager default request: 'Please type your initials: ' translated - initialAnswer: AuthorInitials)! Item was changed: ----- Method: Utilities class>>setAuthorInitials: (in category 'identification') ----- setAuthorInitials: aString + Author current initials: aString! - AuthorInitials := aString. - - "Case of being reset due to, eg, copy of image." - aString isEmpty ifTrue: [AuthorName := '']! Item was changed: ----- Method: Utilities class>>setAuthorName (in category 'identification') ----- setAuthorName + + Author requestAndSetUsername! - AuthorName := UIManager default - request: 'Please type your name:' translated - initialAnswer: 'Your Name' translated! |
Free forum by Nabble | Edit this page |