On Sat, 15 Sep 2012, commits@source.squeak.org wrote:
A new version of System was added to project The Inbox: http://source.squeak.org/inbox/System-cmm.498.mcz
==================== Summary ====================
Name: System-cmm.498 Author: cmm Time: 15 September 2012, 11:41:16.856 am UUID: 20beb771-7672-4ef2-a4cb-ef0d2c77ea53 Ancestors: System-cmm.497
- Limit initials to alphanumeric characters in ASCII range 32 to 128.
- Fixed my initials on a couple of methods.
=============== Diff against System-cmm.497 ===============
Item was changed: ----- Method: Author class>>fullNamePerSe (in category 'pharo compatibility') ----- fullNamePerSe ^ self current initials!
Item was changed: ----- Method: Author>>changeStamp (in category 'accessing') ----- changeStamp ^ self changeStampWithInitials: (self initials ifEmpty: [ 'unknown' ])!
Item was changed: ----- Method: Utilities class>>setAuthorInitials (in category 'identification') ----- setAuthorInitials "Put up a dialog allowing the user to specify the author's initials. " | oldInitials | oldInitials := Author current initials. Author reset.
Using #reset will throw the username away if it was set.
Levente
Author current initials: ((UIManager default request: 'Please type your initials: ' translated
initialAnswer: oldInitials) select:
[ : each | #(#($A $Z ) #($a $z ) #($0 $9 ) ) anySatisfy:
[ : range | each
between: range first
and: range second ] ])!
initialAnswer: oldInitials) select: [ : each | each isOctetCharacter and: [ each isAlphaNumeric ] ])!
I know, but updating the initials on an existing instance may create a mal-formed Author. If you gave me an image you were working on, and I changed the initials, we'd have Author 'cmm' - 'Levente Uzonyi'.
We're moving from Strings to an object. I think ultimately to do it "right" we will need a #setAuthor rather than setInitials. Setting the initials only applies to an Author now, not at a system-level. The system now only knows which whole Author. To support multiple fields I think we'll end up with a "AllAuthors" class-var to hold the collection of Authors known by the system, so we don't have to keep re-creating new ones..
- Chris
On Sat, Sep 15, 2012 at 8:21 PM, Levente Uzonyi leves@elte.hu wrote:
On Sat, 15 Sep 2012, commits@source.squeak.org wrote:
A new version of System was added to project The Inbox: http://source.squeak.org/inbox/System-cmm.498.mcz
==================== Summary ====================
Name: System-cmm.498 Author: cmm Time: 15 September 2012, 11:41:16.856 am UUID: 20beb771-7672-4ef2-a4cb-ef0d2c77ea53 Ancestors: System-cmm.497
- Limit initials to alphanumeric characters in ASCII range 32 to 128.
- Fixed my initials on a couple of methods.
=============== Diff against System-cmm.497 ===============
Item was changed: ----- Method: Author class>>fullNamePerSe (in category 'pharo compatibility') ----- fullNamePerSe ^ self current initials!
Item was changed: ----- Method: Author>>changeStamp (in category 'accessing') ----- changeStamp ^ self changeStampWithInitials: (self initials ifEmpty: [ 'unknown' ])!
Item was changed: ----- Method: Utilities class>>setAuthorInitials (in category 'identification') ----- setAuthorInitials "Put up a dialog allowing the user to specify the author's initials. " | oldInitials | oldInitials := Author current initials. Author reset.
Using #reset will throw the username away if it was set.
Levente
Author current initials: ((UIManager default request: 'Please type your initials: ' translated
initialAnswer: oldInitials) select:
[ : each | #(#($A $Z ) #($a $z ) #($0 $9 ) )
anySatisfy:
[ : range | each
between: range first
and: range second ] ])!
initialAnswer: oldInitials) select: [ : each |
each isOctetCharacter and: [ each isAlphaNumeric ] ])!
squeak-dev@lists.squeakfoundation.org