[Pkg] The Trunk: Morphic-cmm.343.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Feb 14 17:13:30 UTC 2010
Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.343.mcz
==================== Summary ====================
Name: Morphic-cmm.343
Author: cmm
Time: 13 February 2010, 8:56:41.124 pm
UUID: d7f2b1b3-cc0d-48b8-8aeb-c29d9abbddba
Ancestors: Morphic-cmm.342
- Tools enhancement: before opening a new window on a Model, first check whether an existing window on the desktop can fulfill the role and, if so, bring it to the top.
=============== Diff against Morphic-cmm.342 ===============
Item was changed:
----- Method: SystemWindow>>openInWorld:extent: (in category 'open/close') -----
openInWorld: aWorld extent: extent
"This msg and its callees result in the window being activeOnlyOnTop"
+ ^ self anyOpenWindowLikeMe
+ ifEmpty:
+ [ self
+ position: (RealEstateAgent initialFrameFor: self world: aWorld) topLeft ;
+ extent: extent.
+ self openAsIsIn: aWorld ]
+ ifNotEmptyDo:
+ [ : windows |
+ windows anyOne
+ expand ;
+ activate ;
+ postAcceptBrowseFor: self ]!
- self position: (RealEstateAgent initialFrameFor: self world: aWorld) topLeft; extent: extent.
- ^self openAsIsIn: aWorld!
Item was added:
+ ----- Method: SystemWindow>>postAcceptBrowseFor: (in category 'open/close') -----
+ postAcceptBrowseFor: anotherSystemWindow
+ "If I am taking over browsing for anotherSystemWindow, sucblasses may override to, for example, position me to the object to be focused on."
+ self model postAcceptBrowseFor: anotherSystemWindow model!
Item was added:
+ ----- Method: SystemWindow>>anyOpenWindowLikeMe (in category 'open/close') -----
+ anyOpenWindowLikeMe
+ ^ SystemWindow
+ windowsIn: World
+ satisfying:
+ [ : each |
+ each model class = self model class
+ and: [ (each model respondsTo: #representsSameBrowseeAs:)
+ and: [ each model representsSameBrowseeAs: self model ] ] ]!
Item was added:
+ ----- Method: Model>>postAcceptBrowseFor: (in category '*morphic') -----
+ postAcceptBrowseFor: anotherModel
+ "If I am taking over browsing for anotherModel, sucblasses may override to, for example, position me to the object to be focused on."!
Item was added:
+ ----- Method: Lexicon>>targetClass (in category '*morphic') -----
+ targetClass
+
+ ^targetClass
+ !
Item was added:
+ ----- Method: Model>>representsSameBrowseeAs: (in category '*morphic') -----
+ representsSameBrowseeAs: anotherModel
+ "Answer true if my browser can browse what anotherModel wants to browse."
+ ^ false!
Item was added:
+ ----- Method: Inspector>>representsSameBrowseeAs: (in category '*morphic') -----
+ representsSameBrowseeAs: anotherInspector
+ ^ self object == anotherInspector object!
Item was added:
+ ----- Method: HierarchyBrowser>>postAcceptBrowseFor: (in category '*morphic') -----
+ postAcceptBrowseFor: aHierarchyBrowser
+ self
+ selectClass: aHierarchyBrowser selectedClass ;
+ selectedMessageName: aHierarchyBrowser selector!
Item was changed:
----- Method: SystemWindow>>openInWorld: (in category 'open/close') -----
openInWorld: aWorld
"This msg and its callees result in the window being activeOnlyOnTop"
+ self anyOpenWindowLikeMe
+ ifEmpty:
+ [ self
+ bounds: (RealEstateAgent initialFrameFor: self world: aWorld) ;
+ openAsIsIn: aWorld ]
+ ifNotEmptyDo:
+ [ : windows |
+ windows anyOne
+ expand ;
+ activate ;
+ postAcceptBrowseFor: self ]!
- self bounds: (RealEstateAgent initialFrameFor: self world: aWorld).
- ^self openAsIsIn: aWorld!
Item was added:
+ ----- Method: HierarchyBrowser>>representsSameBrowseeAs: (in category '*morphic') -----
+ representsSameBrowseeAs: anotherModel
+ ^ self hasUnacceptedEdits not
+ and: [ "anotherModel selectedClass = self selectedClass" true
+ and: [ classList includesAllOf: anotherModel classList ] ]!
Item was added:
+ ----- Method: Lexicon>>representsSameBrowseeAs: (in category '*morphic') -----
+ representsSameBrowseeAs: anotherModel
+ ^self hasUnacceptedEdits not
+ and: [ anotherModel targetClass = self targetClass ]!
Item was added:
+ ----- Method: ObjectExplorer>>representsSameBrowseeAs: (in category '*morphic') -----
+ representsSameBrowseeAs: anotherObjectExplorer
+ ^ self rootObject == anotherObjectExplorer rootObject!
Item was added:
+ ----- Method: PreferenceBrowser>>representsSameBrowseeAs: (in category '*morphic') -----
+ representsSameBrowseeAs: anotherModel
+ "If an existing Preference browser is on-screen, use it."
+ ^ self class = anotherModel class!
More information about the Packages
mailing list