Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.328.mcz
==================== Summary ====================
Name: EToys-mt.328
Author: mt
Time: 12 May 2018, 10:57:29.401582 am
UUID: 5269f6c3-6d89-294a-a49c-dbd1381b3eb4
Ancestors: EToys-mt.327
Duplicate a check from PolygonMorph in SectorMorph.
Would be nice if we could see if a super call had an early exit. :-) There are several examples in the image such as Morph >> #extent: and the #closeTo: check.
=============== Diff against EToys-mt.327 ===============
Item was changed:
----- Method: SectorMorph>>computeBounds (in category 'updating') -----
computeBounds
super computeBounds.
+ vertices ifNil: [^ self].
self setRotationCenterFrom: vertices first!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1428.mcz
==================== Summary ====================
Name: Morphic-mt.1428
Author: mt
Time: 11 May 2018, 10:02:42.214977 am
UUID: 843c8d82-5e60-8746-b610-418f2d5619fd
Ancestors: Morphic-mt.1427
Reset mouse cursor for pop-up menus.
=============== Diff against Morphic-mt.1427 ===============
Item was changed:
----- Method: MenuMorph>>popUpAt:forHand:in:allowKeyboard: (in category 'control') -----
popUpAt: aPoint forHand: hand in: aWorld allowKeyboard: aBoolean
"Present this menu at the given point under control of the given
hand."
| evt |
aWorld submorphs
select: [:each | (each isKindOf: MenuMorph)
and: [each stayUp not]]
thenCollect: [:menu | menu delete].
self items isEmpty
ifTrue: [^ self].
MenuIcons decorateMenu: self.
(self submorphs
select: [:m | m isKindOf: UpdatingMenuItemMorph])
do: [:m | m updateContents].
"precompute width"
self
positionAt: aPoint
relativeTo: (selectedItem
ifNil: [self items first])
inWorld: aWorld.
aWorld addMorphFront: self.
"Acquire focus for valid pop up behavior"
+ hand
+ newMouseFocus: self;
+ showTemporaryCursor: nil.
- hand newMouseFocus: self.
aBoolean
ifTrue: [
originalFocusHolder := hand keyboardFocus.
hand newKeyboardFocus: self.
self showKeyboardHelp].
evt := hand lastEvent.
(evt isKeyboard
or: [evt isMouse
and: [evt anyButtonPressed not]])
ifTrue: ["Select first item if button not down"
self moveSelectionDown: 1 event: evt
"Select first item if button not down"].
self updateColor.
self changed!
tim Rowledge uploaded a new version of 60Deprecated to project The Trunk:
http://source.squeak.org/trunk/60Deprecated-tpr.19.mcz
==================== Summary ====================
Name: 60Deprecated-tpr.19
Author: tpr
Time: 10 May 2018, 2:52:18.56558 pm
UUID: d97f4ebe-21aa-43d6-92f8-8e13d7564217
Ancestors: 60Deprecated-mt.18
deprecate an annoyingly (mis)named method. See also Tools-tpr.813 for the replacement
=============== Diff against 60Deprecated-mt.18 ===============
Item was added:
+ ----- Method: ObjectExplorer>>classHierarchy (in category '*60Deprecated-Tools') -----
+ classHierarchy
+ "Create and schedule a class list browser on the receiver's hierarchy."
+
+ self deprecated: 'Use #browseClassHierarchy instead'.
+ self browseClassHierarchy
+ !
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1025.mcz
==================== Summary ====================
Name: System-mt.1025
Author: mt
Time: 9 May 2018, 9:23:01.362554 am
UUID: 061ddb0a-c159-884b-8964-3f3c2f74e7c7
Ancestors: System-mt.1024
Fixes typo.
=============== Diff against System-mt.1024 ===============
Item was changed:
Object subclass: #UserInterfaceTheme
instanceVariableNames: 'properties name next ignoreApply lastScaleFactor'
classVariableNames: 'All Current Default'
poolDictionaries: ''
category: 'System-Support'!
+ !UserInterfaceTheme commentStamp: 'mt 5/9/2018 09:22' prior: 0!
- !UserInterfaceTheme commentStamp: 'rhi 5/5/2018 09:18' prior: 0!
A UserInterfaceTheme is a dictionary of preferred visual properties; colors, borderStyles, borderWidths, fonts, forms, etc. used to color and style the IDE.
Accessing the Theme
+ To access the proper UserInterfaceTheme instance for an object, send it #userInterfaceTheme. The default implementation on Object returns an instance of UserInterfaceThemeRequest that provides a lightweight, clean proxy of the actual theme in use by the IDE at the current time. To do anything more sophisticated than basic querying and setting of properties, you must ask the proxy for the actual theme by sending #theme.
- To access the proper UserInterfaceTheme instance for an object, send it #userInterfaceTheme. The default implementation on Object returns an instance of UserInterfaceThemeRequest that provides a lightweight, clean proxy of the actual theme in use by the IDE at the current time. To do anything more sophisticated than basic queryinh and setting of properties, you must ask the proxy for the actual theme by sending #theme.
Customizing the Theme
We can ask the #userInterfaceTheme for the value of any visual property by name:
mySystemWindow userInterfaceTheme closeBoxImage
Initially that would answer nil, which causes the legacy code to use whatever default it used so far. To override various visual properties of any kind of object, the #set:for:to: message can be used, for example:
myUserInterfaceTheme
set: #closeBoxImage
for: SystemWindow
to: MenuIcons smallCancelIcon
Now the closeBoxImage message will answer the MenuIcons icon instead of nil.
Alternatively, values may be derived based on other values in the theme, as in:
myUserInterfaceTheme
set: #color
for: FillInTheBlankMorph
to: { MenuMorph->#color. #twiceDarker }
This makes FillInTheBlankMorph use the same color as a MenuMorph but #twiceDarker, providing a clean way to build coherent sets of colors within a theme. SystemWindow's code can be changed to use the expression above to access elements of the theme.
Upgrading Legacy Code
Following the introduction of this class, various client code all around the system must be modified to access it. This variety of legacy code uses a variety of methods to specify their visual properties:
1) a hard-coded values.
2) a values derived from some other value.
3) providing local storage for a settable value which can be nil.
4) providing local storage for a settable value which is expected to always have a particular valid value (never nil).
The requirement, for each case, is to let the value be overridden.
The solution for each of the above should be handled respectively to the above list, as follows:
1) Check the #userInterfaceTheme, if that property returns nil, use the legacy hard-coded value. (see example: SystemWindow>>#createCloseBox).
2) Nothing to do -- simply perform the same derivation on the result of (1).
3) Check the local storage, if present, use it. If nil, then check the #userInterfaceTheme, if it has this property present, use it, else return nil.
4) Check the #userInterfaceTheme, if the property is not nil, use it, otherwise use the local value.
Tool Support
If a new access to #userInterfaceTheme is added to the code, be sure to add the property and its description to the #themeSettings for that class. See implementors of #themeSettings for examples.!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1024.mcz
==================== Summary ====================
Name: System-mt.1024
Author: mt
Time: 9 May 2018, 8:36:00.223271 am
UUID: 74d2ef0a-9d9a-2847-a108-68482bd91da4
Ancestors: System-mt.1023
Updates code comments and some code formatting.
=============== Diff against System-mt.1023 ===============
Item was changed:
UserInterfaceTheme subclass: #CommunityTheme
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'System-Support'!
+ !CommunityTheme commentStamp: 'rhi 5/5/2018 09:27' prior: 0!
+ A dark theme designed by members of the Squeak community.!
- !CommunityTheme commentStamp: 'mt 7/26/2016 16:22' prior: 0!
- A dark theme designed by members the Squeak community such as Karl Ramberg, Chris Muller, and Marcel Taeumel.!
Item was changed:
Object subclass: #UserInterfaceTheme
instanceVariableNames: 'properties name next ignoreApply lastScaleFactor'
classVariableNames: 'All Current Default'
poolDictionaries: ''
category: 'System-Support'!
+ !UserInterfaceTheme commentStamp: 'rhi 5/5/2018 09:18' prior: 0!
+ A UserInterfaceTheme is a dictionary of preferred visual properties; colors, borderStyles, borderWidths, fonts, forms, etc. used to color and style the IDE.
- !UserInterfaceTheme commentStamp: 'tpr 9/25/2017 11:59' prior: 0!
- A UserInterfaceTheme is a dictionary of preferred visual-properties; colors, borderStyles, borderWidths, fonts, forms, etc. used to color and style the IDE.
+ Accessing the Theme
+ To access the proper UserInterfaceTheme instance for an object, send it #userInterfaceTheme. The default implementation on Object returns an instance of UserInterfaceThemeRequest that provides a lightweight, clean proxy of the actual theme in use by the IDE at the current time. To do anything more sophisticated than basic queryinh and setting of properties, you must ask the proxy for the actual theme by sending #theme.
- Accessing The Theme
- To access the proper UserInterfaceTheme instance for an object, send it #userInterfaceTheme. The default implementation on Object provides the an instance of UserInterfaceThemeRequest that provides a lightweight, clean proxy of the actual theme in-use by the IDE at the current time. To do anything more sophisticated than basic query and setting of properties you must ask the proxy for the actual theme by sending #theme.
+ Customizing the Theme
+ We can ask the #userInterfaceTheme for the value of any visual property by name:
- Customizing The Theme
- We can ask the userInterfaceTheme for the value of any visual-property, by name:
mySystemWindow userInterfaceTheme closeBoxImage
+ Initially that would answer nil, which causes the legacy code to use whatever default it used so far. To override various visual properties of any kind of object, the #set:for:to: message can be used, for example:
- Initially that would answer nil, which causes the legacy code to use whatever default it's always used. To override various visual-properties of any kind of object, the #set: for: to: message can be used. For example,
myUserInterfaceTheme
set: #closeBoxImage
for: SystemWindow
to: MenuIcons smallCancelIcon
Now the closeBoxImage message will answer the MenuIcons icon instead of nil.
Alternatively, values may be derived based on other values in the theme, as in:
myUserInterfaceTheme
set: #color
for: FillInTheBlankMorph
+ to: { MenuMorph->#color. #twiceDarker }
- to: { MenuMorph->#color. #twiceDarker }
+ This makes FillInTheBlankMorph use the same color as a MenuMorph but #twiceDarker, providing a clean way to build coherent sets of colors within a theme. SystemWindow's code can be changed to use the expression above to access elements of the theme.
- This would make FillInTheBlankMorph use the same color as a MenuMorph but twiceDarker, providing a clean way to build coherent seets of colors within a theme. SystemWindow's code can be changed to use the expression above to access elements of the theme.
Upgrading Legacy Code
+ Following the introduction of this class, various client code all around the system must be modified to access it. This variety of legacy code uses a variety of methods to specify their visual properties:
- Following the introduction of this class, various client code all around the system must be modified to access it. This variety of legacy code uses a variety of methods to specify their visual properties:
1) a hard-coded values.
2) a values derived from some other value.
3) providing local storage for a settable value which can be nil.
4) providing local storage for a settable value which is expected to always have a particular valid value (never nil).
+ The requirement, for each case, is to let the value be overridden.
- The requirement, for each case, is to let the value be overridden.
The solution for each of the above should be handled respectively to the above list, as follows:
+ 1) Check the #userInterfaceTheme, if that property returns nil, use the legacy hard-coded value. (see example: SystemWindow>>#createCloseBox).
- 1) Check the userInterfaceTheme, if that property returns nil, use the legacy hard-coded value. (see example: SystemWindow>>#createCloseBox).
2) Nothing to do -- simply perform the same derivation on the result of (1).
+ 3) Check the local storage, if present, use it. If nil, then check the #userInterfaceTheme, if it has this property present, use it, else return nil.
+ 4) Check the #userInterfaceTheme, if the property is not nil, use it, otherwise use the local value.
- 3) Check the local storage, if present, use it. If nil, then check the userInterfaceTheme, if it has this property present, use it, else return nil.
- 4) Check the userInterfaceTheme, if the property is not nil, use it, otherwise use the local value.
Tool Support
+ If a new access to #userInterfaceTheme is added to the code, be sure to add the property and its description to the #themeSettings for that class. See implementors of #themeSettings for examples.!
- If a new access to #userInterfaceTheme is added to the code, be sure to add the property and its description to the #themeSettings for that class. See implementors of #themeSettings for examples.!
Item was changed:
----- Method: UserInterfaceTheme class>>allThemeProperties (in category 'tools') -----
allThemeProperties
+ "Answer an Array of 3-element Arrays. Each inner Array holds the information needed to present a theme editor tool; the property name, category, and description."
+
+ "self allThemeProperties"
+
+ ^ Array streamContents: [:stream |
+ self allThemePropertiesDo: [:cls :prop |
+ stream nextPut: {cls}, prop]]!
- "Answer an Array of 3-element Array's. Each inner Array are the information needed to present a Theme editor tool; the property name, category, and description.
-
- self allThemeProperties"
-
- ^ Array streamContents:
- [ : stream | self allThemePropertiesDo: [ : cls : prop | stream nextPut: {cls}, prop ]]!
Item was changed:
----- Method: UserInterfaceTheme class>>allThemes (in category 'accessing') -----
allThemes
+
^ All ifNil: [All := IdentitySet new]!
Item was changed:
----- Method: UserInterfaceTheme class>>cleanUp: (in category 'initialize-release') -----
cleanUp: aggressive
aggressive ifTrue: [
All := nil.
+ SqueakTheme
+ create;
+ createDuller.
+ SolarizedTheme
+ createDark;
+ createLight.
- SqueakTheme create; createDuller.
- SolarizedTheme createDark; createLight.
MonokaiTheme createDark.
CommunityTheme createDark.
TrimTheme create].!
Item was changed:
----- Method: UserInterfaceTheme class>>clientClassesToReapply (in category 'private') -----
clientClassesToReapply
"All client classes plus their unique subclasses."
+ ^ IdentitySet new in: [:result |
+ self clientClasses do: [:cc |
+ cc withAllSubclassesDo: [:sc |
+ result add: sc]].
+ result]!
- ^ IdentitySet new in: [:result | self clientClasses do: [:cc | cc withAllSubclassesDo: [:sc |
- result add: sc]]. result]
- !
Item was changed:
----- Method: UserInterfaceTheme class>>current: (in category 'accessing') -----
current: aUserInterfaceTheme
"Replace the current system theme with aUserInterfaceTheme."
+
+ Current := aUserInterfaceTheme.
+ "Notify?"!
- Current := aUserInterfaceTheme
- "Notify?"!
Item was changed:
----- Method: UserInterfaceTheme class>>default (in category 'accessing') -----
default
+ ^ Default ifNil: [Default := self new
+ name: 'Autogenerated Default';
+ yourself]!
- ^ Default ifNil: [Default := self new name: 'Autogenerated Default'; yourself]!
Item was changed:
----- Method: UserInterfaceTheme class>>default: (in category 'accessing') -----
default: aUserInterfaceTheme
+
Default := aUserInterfaceTheme.!
Item was changed:
----- Method: UserInterfaceTheme class>>named: (in category 'initialize-release') -----
named: aString
+
^ self allThemes
detect: [:ea | ea name = aString]
+ ifNone: [self new
+ name: aString;
+ register]!
- ifNone: [self new name: aString; register]!
Item was changed:
----- Method: UserInterfaceTheme class>>propertiesForCategory: (in category 'tools') -----
propertiesForCategory: categoryName
+
+ ^ self allThemeProperties select: [:each | each third = categoryName]!
- ^ self allThemeProperties select: [ : each | each third = categoryName ]!
Item was changed:
----- Method: UserInterfaceTheme class>>propertiesForClass: (in category 'tools') -----
propertiesForClass: aClass
+
+ ^ self allThemeProperties select: [:each | each first == aClass]!
- ^ self allThemeProperties select: [ : each | each first = aClass ]!
Item was changed:
Object subclass: #UserInterfaceThemeRequest
instanceVariableNames: 'target theme'
classVariableNames: ''
poolDictionaries: ''
category: 'System-Support'!
+ !UserInterfaceThemeRequest commentStamp: 'rhi 5/5/2018 09:30' prior: 0!
+ To be able to use a UserInterfaceTheme as a container of fairly arbitrary properties whilst making it seem like we are sending regular messages as a way of accessing those properties, we can handle #doesNotUnderstand: and check the name of the message not understood against our property list. This is clever, devious, interesting, and may confuse users until they get to see an explanation like this.
- !UserInterfaceThemeRequest commentStamp: 'mt 9/23/2017 10:37' prior: 0!
- In order to be able to use a UserInterfaceTheme as a container of fairly arbitrary properties whilst making it seem like we are sending regular messages as a way of accessing those properties we can handle the dNU: and check the not understood message name against our property list. This is clever, devious, interesting and may confuse users until they get to see an explanation like this.
Answer nil or a value for the property specified by aMessage's #selector. Searching for the property proceeds by
+ a) searching my dictionary for a key made up of an Association with a key of the class of the 'client' and a value of the message name. For example SimpleButtonMorph->#borderColor
+ b) searching again for a key made from the superclass(es) of the client - e.g. RectangleMorph->borderColor and then if required BorderedMorph->#borderColor etc.
- a) searching my dictionary for a key made up of an Association with a key of the class of the 'client' and a value of the message name. For example SimpleButtonMorph->borderColor
- b) searching again for a key made from the superclass(es) of the client - e.g. RectangleMorph->borderColor and then if required BorderedMorph->borderColor etc.
c) if there is a linked theme, search it in the same manner.
+ As an extreme example, consider a basic theme with a linked theme specific to buttons:
- As an extreme example, consider a basic theme with a linked theme specifically for buttons.
mySimpleButtonMorph borderColor
+ ... would search the basic theme for SimpleButtonMorph->#borderColor, the superclass equivalents as in b) above, then search the linked theme for SimpleButtonMorph->#borderColor and (hopefully) find something meaningful.!
- ... would search the basic theme for SimpleButtonMorph->borderColor, the superclass equivalents as in b) above, then search the linked theme for SimpleButtonMorph->borderColor and, we hope, find something meaningful.!
Item was changed:
----- Method: UserInterfaceThemeRequest>>doesNotUnderstand: (in category 'lookup') -----
doesNotUnderstand: aMessage
+ "Look up the visual attribute specified by aMessage's #selector in the current theme for the current target object."
- "Look up the visual-attribute specified by aMessage's #selector in the current theme for the current target object."
aMessage numArgs = 0 ifTrue: [
^ (self theme get: self target class -> aMessage selector)
ifNil: [(self theme respondsTo: aMessage selector)
ifTrue: [self theme perform: aMessage selector]
+ ifFalse: [nil "unset property"]]].
- ifFalse: [nil "means unset property"]]].
^ self theme
perform: aMessage selector
withArguments: aMessage arguments.!
Chris Muller uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cmm.812.mcz
==================== Summary ====================
Name: Tools-cmm.812
Author: cmm
Time: 8 May 2018, 10:59:15.586524 pm
UUID: d05b5ccd-cc99-4f00-85b1-264218092ef2
Ancestors: Tools-dtl.811
- Integrate newly-defined classes into the hierarchy list of a HierarchyBrowser without muting the other classes. If it's outside the hierarchy, spawn it in a new window.
- Bug reports can contain sensitive and/or private information (variable values), so use care when sending them electronically. 'copy bug report to clipboard' replaced 'mail out bug report' on the debugger menu.
=============== Diff against Tools-dtl.811 ===============
Item was changed:
----- Method: Browser>>defineClass:notifying: (in category 'class functions') -----
defineClass: defString notifying: aController
"The receiver's textual content is a request to define a new class. The
source code is defString. If any errors occur in compilation, notify
aController."
| oldClass class newClassName defTokens keywdIx envt |
oldClass := self selectedClassOrMetaClass.
defTokens := defString findTokens: Character separators.
((defTokens first = 'Trait' and: [defTokens second = 'named:'])
or: [defTokens second = 'classTrait'])
ifTrue: [^self defineTrait: defString notifying: aController].
keywdIx := defTokens findFirst: [:x | x beginsWith: 'category'].
envt := self selectedEnvironment.
keywdIx := defTokens findFirst: [:x | '*subclass*' match: x].
newClassName := (defTokens at: keywdIx+1) copyWithoutAll: '#()'.
((oldClass isNil or: [oldClass theNonMetaClass name asString ~= newClassName])
and: [envt includesKey: newClassName asSymbol]) ifTrue:
["Attempting to define new class over existing one when
not looking at the original one in this browser..."
(self confirm: ((newClassName , ' is an existing class in this system.
Redefining it might cause serious problems.
Is this really what you want to do?') asText makeBoldFrom: 1 to: newClassName size))
ifFalse: [^ false]].
"ar 8/29/1999: Use oldClass superclass for defining oldClass
since oldClass superclass knows the definerClass of oldClass."
oldClass ifNotNil:[oldClass := oldClass superclass].
class := envt beCurrentDuring:
[oldClass subclassDefinerClass
evaluate: defString
in: envt
notifying: aController
logged: false].
(class isKindOf: Behavior)
+ ifTrue: [self changed: #systemCategoryList; changed: #classList.
+ self clearUserEditFlag; spawnOrNavigateTo: class.
- ifTrue: [self changed: #systemCategoryList.
- self changed: #classList.
- self clearUserEditFlag.
- self setClass: class selector: nil.
- "self clearUserEditFlag; editClass."
^ true]
ifFalse: [^ false]!
Item was added:
+ ----- Method: Browser>>spawnOrNavigateTo: (in category 'private') -----
+ spawnOrNavigateTo: aClass
+ self setClass: aClass selector: nil!
Item was changed:
----- Method: Debugger>>mainContextStackMenu: (in category 'context stack menu') -----
mainContextStackMenu: aMenu
"Set up the menu appropriately for the context-stack-list, unshifted"
<contextStackMenuShifted: false>
^ aMenu addList: #(
('fullStack (f)' fullStack)
('restart (r)' restart)
('proceed (p)' proceed)
('step (t)' doStep)
('step through (T)' stepIntoBlock)
('send (e)' send)
('where (w)' where)
('peel to first like this' peelToFirst)
-
('return entered value' returnValue)
-
('toggle break on entry' toggleBreakOnEntry)
('senders of (n)' browseSendersOfMessages)
('implementors of (m)' browseMessages)
('inheritance (i)' methodHierarchy)
-
('versions (v)' browseVersions)
-
('references (r)' browseVariableReferences)
('assignments (a)' browseVariableAssignments)
-
('class refs (N)' browseClassRefs)
('browse full (b)' browseMethodFull)
('file out ' fileOutMessage)
-
+ ('copy bug report to clipboard' copyBugReportToClipboard));
- ('mail out bug report' mailOutBugReport)
- ('bug report to clipboard' copyBugReportToClipboard));
yourself
!
Item was changed:
----- Method: HierarchyBrowser>>setClass: (in category 'initialization') -----
+ setClass: aClass
+ self initHierarchyForClass: (centralClass ifNil: [ aClass ]).
+ super setClass: aClass!
- setClass: aClass
-
- self initHierarchyForClass: aClass.
- super setClass: aClass.!
Item was added:
+ ----- Method: HierarchyBrowser>>spawnOrNavigateTo: (in category 'private') -----
+ spawnOrNavigateTo: aClass
+ (aClass inheritsFrom: centralClass)
+ ifTrue: [ super spawnOrNavigateTo: aClass ]
+ ifFalse: [ self systemNavigation browseHierarchy: aClass ]!
Item was changed:
----- Method: HierarchyBrowser>>updateAfterClassChange (in category 'initialization') -----
updateAfterClassChange
"It is possible that some the classes comprising the hierarchy have changed, so reinitialize the entire browser."
+ | priorSelection |
+ priorSelection := self selectedClassName.
+
(centralClass notNil and: [centralClass isObsolete not])
+ ifTrue: [self initHierarchyForClass: centralClass].
+
+ (self classListIndexOf: priorSelection) > 0
+ ifTrue: [self selectClassNamed: priorSelection].!
- ifTrue: [self initHierarchyForClass: centralClass]!