tim Rowledge uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-tpr.970.mcz
==================== Summary ====================
Name: System-tpr.970
Author: tpr
Time: 21 October 2017, 6:02:31.987517 pm
UUID: 6fa3986a-3897-42ce-aca9-139253493f33
Ancestors: System-dtl.969
Improve two Browser related comments; one so the example actually works.
=============== Diff against System-dtl.969 ===============
Item was changed:
----- Method: SystemNavigation>>browseClassesWithNamesContaining:caseSensitive: (in category 'browse') -----
browseClassesWithNamesContaining: aString caseSensitive: caseSensitive
+ "SystemNavigation default browseClassesWithNamesContaining: 'eMorph' caseSensitive: true "
- "Smalltalk browseClassesWithNamesContaining: 'eMorph' caseSensitive: true "
"Launch a class-list list browser on all classes whose names containg aString as a substring."
| suffix aList |
suffix := caseSensitive
ifTrue: [' (case-sensitive)']
ifFalse: [' (use shift for case-sensitive)'].
aList := OrderedCollection new.
Cursor wait
showWhile: [Smalltalk
allClassesDo: [:class | (class name includesSubstring: aString caseSensitive: caseSensitive)
ifTrue: [aList add: class name]]].
aList size > 0
ifTrue: [ToolSet openClassListBrowser: aList asSet sorted title: 'Classes whose names contain ' , aString , suffix]!
Item was changed:
----- Method: ToolSet class>>openClassListBrowser:title: (in category 'browsing') -----
openClassListBrowser: anArray title: aString
+ "Open a class list browser on the list of classes named"
+
- "Open a class list browser"
self default ifNil:[^self inform: 'Cannot open ClassListBrowser'].
^self default openClassListBrowser: anArray title: aString!
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.969.mcz
==================== Summary ====================
Name: System-dtl.969
Author: dtl
Time: 20 October 2017, 8:14:14.736464 pm
UUID: 701eefc3-8cfa-4085-8c10-e54dd4759ac2
Ancestors: System-dtl.968
Remove unreferenced instance variable #environment from class Project. In earlier versions of Squeak (see Squeak 3.6), this was part of a mechanism for supporting isolation layers, and there was a class Environment that is unrelated to our current implementation of Environments. Note that the current Environments implementation would permit the old class Environment to be loaded into a separate Environment. This is left as an exercise for the reader.
=============== Diff against System-dtl.968 ===============
Item was changed:
Model subclass: #Project
+ instanceVariableNames: 'world uiManager changeSet transcript parentProject previousProject displayDepth viewSize thumbnail nextProject projectParameters version urlList lastDirectory lastSavedAtSeconds projectPreferenceFlagDictionary resourceManager'
- instanceVariableNames: 'world uiManager changeSet transcript parentProject previousProject displayDepth viewSize thumbnail nextProject projectParameters version urlList environment lastDirectory lastSavedAtSeconds projectPreferenceFlagDictionary resourceManager'
classVariableNames: 'AllProjects CurrentProject GoalFreePercent GoalNotMoreThan'
poolDictionaries: ''
category: 'System-Support'!
!Project commentStamp: 'cbr 7/27/2010 21:36' prior: 0!
A Project stores the state of a complete Squeak desktop, including
the windows, and the currently active changeSet. A project knows who
its parent project is. When you change projects, whether by entering
or exiting, the screen state of the project being exited is saved in
that project.
A project is retained by its view in the parent world. It is
effectively named by the name of its changeSet, which can be changed
either by renaming in a changeSorter, or by editing the label of its
view from the parent project.
As the site of major context switch, Projects are the locus of
swapping between the old MVC and the new Morphic worlds. The
distinction is based on whether the variable 'world' contains a
WorldMorph or a ControlManager.
Saving and Loading
Projects may be stored on the disk in external format. (Project
named: 'xxx') exportSegment, or choose 'store project on file...'.
Projects may be loaded from a server and stored back. Storing on a
server never overwrites; it always makes a new version. A project
remembers the url of where it lives in urlList. The list is length
one, for now. The url may point to a local disk instead of a server.
All projects that the user looks at are cached in the Squeaklet
folder. Sorted by server. The cache holds the most recent version
only.
When a project is loaded into Squeak, its objects are converted to
the current version. There are three levels of conversion. First,
each object is converted from raw bits to an object in its old
format. Then it is sent some or all of these messages:
comeFullyUpOnReload: smartRefStream Used to
re-discover an object that already exists in this image, such as a
resource, global variable, Character, or Symbol. (sent to objects in
outPointers)
convertToCurrentVersion: varDict refStream: smartRefStrm
fill in fields that have been added to a class since
the object was stored. Used to set the extra inst var to a default
value. Or, return a new object of a different class. (sent to
objects that changed instance variables)
fixUponLoad: aProject refStream: smartRefStrm
change the object due to conventions that have changed on the
project level. (sent to all objects in the incoming project)
Here is the calling sequence for storing out a Project:
Project saveAs
Project storeOnServer
Project storeOnServerWithProgressInfo
Project storeOnServerInnards
Project exportSegmentFileName:directory:
Project exportSegmentWithChangeSet:fileName:directory:
ImageSegment writeForExportWithSources:inDirectory:changeSet:
!
David T. Lewis uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-dtl.310.mcz
==================== Summary ====================
Name: EToys-dtl.310
Author: dtl
Time: 14 October 2017, 7:25:17.542836 pm
UUID: 29e207b2-1345-4fce-9f27-1a372728536e
Ancestors: EToys-mt.309
Follow up for EToys-tfel.266
The default environment should be "Smalltalk environment" rather than "Smalltalk"
=============== Diff against EToys-mt.309 ===============
Item was changed:
----- Method: ScriptEncoder>>init:context:notifying: (in category 'as yet unclassified') -----
init: class context: ctxt notifying: parser
super
init: (CompilationCue
source: nil
context: ctxt
receiver: nil
class: class
+ environment: Smalltalk environment
- environment: Smalltalk
requestor: nil)
notifying: parser!
David T. Lewis uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-dtl.210.mcz
==================== Summary ====================
Name: MorphicExtras-dtl.210
Author: dtl
Time: 30 September 2017, 11:00:57.627669 am
UUID: 4c13263d-1a0c-4857-8906-4ea09598f70b
Ancestors: MorphicExtras-tpr.209
Reimplement RealEstateAgent class>>reduceByFlaps: to protect margins for size of flap handles, but no special case logic for 'Painting' flap, and do not reduce margins by 64 in any case.
This affects placement of SystemWindows, which avoids covering top flaps with a repositioned window. The previous implementation prevented placement of windows at the top portion of the display area if flaps were enabled in a project.
=============== Diff against MorphicExtras-tpr.209 ===============
Item was changed:
----- Method: RealEstateAgent class>>reduceByFlaps: (in category '*MorphicExtras-utilities') -----
reduceByFlaps: aScreenRect
"Return a rectangle that won't interfere with default shared flaps"
+ | top bottom left right |
Flaps sharedFlapsAllowed ifFalse: [^ aScreenRect copy].
+
+ top := bottom := left := right := 0.
+ Flaps globalFlapTabs do: [ :ft | | w h |
+ w := ft width.
+ h := ft height.
+ ft edgeToAdhereTo
+ caseOf: {
+ [ #top ] -> [ top := top max: h ].
+ [ #bottom ] -> [ bottom := bottom max: h ] .
+ [ #left ] -> [ left := left max: w ] .
+ [ #right ] -> [ right := right max: w ] .
+ }
+ otherwise: [] ].
+ ^ Rectangle
+ origin: aScreenRect origin + (left @ top)
+ extent: aScreenRect extent - (bottom @ right).
+ !
- (Flaps globalFlapTabsIfAny allSatisfy:
- [:ft | ft flapID = 'Painting' translated or: [ft edgeToAdhereTo == #bottom]])
- ifTrue: [^ aScreenRect withHeight: aScreenRect height - 18]
- ifFalse: [^ aScreenRect insetBy: 64]!
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.968.mcz
==================== Summary ====================
Name: System-dtl.968
Author: dtl
Time: 14 October 2017, 2:45:35.676806 pm
UUID: 764236d5-e9b8-4e24-9b9c-fa609210822a
Ancestors: System-hjh.967
Use a pragma rather than #flag: to identify senders of methods dispatched through #dispatchTo:addPrefixAndSend:withArguments:
Inspired by System-bf.966
=============== Diff against System-hjh.967 ===============
Item was added:
+ ----- Method: Project class>>baseSelectors (in category 'dispatching') -----
+ baseSelectors
+ "The list of known base selectors that may be dispatched to project specific
+ implementations. For example, #OpenLabel:in: will be dispatched to #mvcOpenLabel:in:
+ for its MVC specific implementation. Add new base selectors here if additional methods
+ are added as targets of the dispatchTo:addPrefixAndSend:withArguments: mechanism."
+
+ ^ {
+ #StartUpLeftFlush .
+ #StartUpWithCaption:icon:at:allowKeyboard: .
+ #OpenLabel:in: .
+ #Open: .
+ #Open .
+ #OpenOn:context:label:contents:fullView: .
+ #ResumeProcess:
+ }
+ !
Item was added:
+ ----- Method: Project class>>dispatchSelectors (in category 'dispatching') -----
+ dispatchSelectors
+ "All known targets of the dispatch mechanism"
+
+ "Project dispatchSelectors"
+
+ | selectors dispatchPrefixes |
+ selectors := OrderedCollection new.
+ dispatchPrefixes := Set withAll: (Project allSubclasses collect: [ :e | e basicNew selectorPrefixForDispatch ]).
+ self baseSelectors do: [ :base |
+ dispatchPrefixes do: [ :prefix |
+ selectors add: (prefix, base) asSymbol ] ].
+ ^ selectors
+
+ !
Item was added:
+ ----- Method: Project class>>isDispatchSelector: (in category 'dispatching') -----
+ isDispatchSelector: aSelector
+ "In support of package modularity, some method selectors are generated based
+ on project type and dispatched to the appropriate implementation for that project.
+ For methods with these selectors, let dispatchTo:addPrefixAndSend:withArguments:
+ be found as a sender."
+
+ ^ self dispatchSelectors includes: aSelector.
+ !
Item was changed:
----- Method: Project>>dispatchTo:addPrefixAndSend:withArguments: (in category 'dispatching') -----
dispatchTo: requestor addPrefixAndSend: baseSelector withArguments: arguments
"Sender wants to perform a method with dependencies on the type of project.
Dispatch to an appropriate method for the current project.
+
+ If additional base selectors are added for dispatching, the list of base selectors
+ in Project class>>baseSelectors should be updated.
This method is a workaround for lack of proper ToolBuilder support in the sender,
and should be eliminated when possible (dtl Feb 2010)"
+ <hasLiteralTest: #isDispatchSelector:>
| selector |
- "Flag target selectors to help identify senders"
- true ifFalse: [
- self flag: #mvcOpenLabel:in: .
- self flag: #morphicOpenLabel:in: .
- self flag: #mvcStartUpLeftFlush .
- self flag: #morphicStartUpLeftFlush .
- self flag: #mvcStartUpWithCaption:icon:at:allowKeyboard: .
- self flag: #morphicStartUpWithCaption:icon:at:allowKeyboard: .
- self flag: #mvcOpen: .
- self flag: #morphicOpen: .
- self flag: #mvcOpen .
- self flag: #morphicOpen .
- self flag: #mvcOpenOn:context:label:contents:fullView: .
- self flag: #morphicOpenOn:context:label:contents:fullView: .
- self flag: #mvcResumeProcess: .
- self flag: #morphicResumeProcess:
- ].
selector := (self selectorPrefixForDispatch, baseSelector) asSymbol.
^ requestor perform: selector withArguments: arguments!