Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.1409.mcz ==================== Summary ==================== Name: Morphic-cmm.1409 Author: cmm Time: 4 April 2018, 2:30:02.510117 pm UUID: 6d625668-7bfe-4baa-8c15-ea49525a34dd Ancestors: Morphic-cmm.1408 Slightly better fix (thanks Tim) which uses the World passed-in to the sender rather than the global World. =============== Diff against Morphic-cmm.1408 =============== Item was removed: - ----- Method: SystemWindow>>anyOpenWindowLikeMe (in category 'open/close') ----- - anyOpenWindowLikeMe - - self class reuseWindows ifFalse: [ ^Array empty ]. - ^ 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: SystemWindow>>anyOpenWindowLikeMeIn: (in category 'open/close') ----- + anyOpenWindowLikeMeIn: aPasteUpMorph + self class reuseWindows ifFalse: [ ^Array empty ]. + ^ SystemWindow + windowsIn: aPasteUpMorph + satisfying: + [ : each | + each model class = self model class + and: [ (each model respondsTo: #representsSameBrowseeAs:) + and: [ each model representsSameBrowseeAs: self model ] ] ] + ! Item was changed: ----- Method: SystemWindow>>openInWorld: (in category 'open/close') ----- openInWorld: aWorld "This msg and its callees result in the window being activeOnlyOnTop" + ^ (self anyOpenWindowLikeMeIn: aWorld) - ^ self anyOpenWindowLikeMe ifEmpty: [ self bounds: (RealEstateAgent initialFrameFor: self world: aWorld) ; openAsIsIn: aWorld ] ifNotEmptyDo: [ : windows | windows anyOne expand ; beKeyWindow ; postAcceptBrowseFor: self ].! 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 anyOpenWindowLikeMeIn: aWorld) - ^ self anyOpenWindowLikeMe ifEmpty: [ self position: (RealEstateAgent initialFrameFor: self initialExtent: extent world: aWorld) topLeft ; extent: extent. self openAsIsIn: aWorld ] ifNotEmptyDo: [ : windows | windows anyOne expand ; beKeyWindow ; postAcceptBrowseFor: self ].! |
Brilliant, thanks to both of you! One less "what is the world" problem to worry about.
Dave On Wed, Apr 04, 2018 at 07:30:50PM +0000, [hidden email] wrote: > Chris Muller uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-cmm.1409.mcz > > ==================== Summary ==================== > > Name: Morphic-cmm.1409 > Author: cmm > Time: 4 April 2018, 2:30:02.510117 pm > UUID: 6d625668-7bfe-4baa-8c15-ea49525a34dd > Ancestors: Morphic-cmm.1408 > > Slightly better fix (thanks Tim) which uses the World passed-in to the sender rather than the global World. > > =============== Diff against Morphic-cmm.1408 =============== > > Item was removed: > - ----- Method: SystemWindow>>anyOpenWindowLikeMe (in category 'open/close') ----- > - anyOpenWindowLikeMe > - > - self class reuseWindows ifFalse: [ ^Array empty ]. > - ^ 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: SystemWindow>>anyOpenWindowLikeMeIn: (in category 'open/close') ----- > + anyOpenWindowLikeMeIn: aPasteUpMorph > + self class reuseWindows ifFalse: [ ^Array empty ]. > + ^ SystemWindow > + windowsIn: aPasteUpMorph > + satisfying: > + [ : each | > + each model class = self model class > + and: [ (each model respondsTo: #representsSameBrowseeAs:) > + and: [ each model representsSameBrowseeAs: self model ] ] ] > + ! > > Item was changed: > ----- Method: SystemWindow>>openInWorld: (in category 'open/close') ----- > openInWorld: aWorld > "This msg and its callees result in the window being activeOnlyOnTop" > + ^ (self anyOpenWindowLikeMeIn: aWorld) > - ^ self anyOpenWindowLikeMe > ifEmpty: > [ self > bounds: (RealEstateAgent initialFrameFor: self world: aWorld) ; > openAsIsIn: aWorld ] > ifNotEmptyDo: > [ : windows | > windows anyOne > expand ; > beKeyWindow ; > postAcceptBrowseFor: self ].! > > 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 anyOpenWindowLikeMeIn: aWorld) > - ^ self anyOpenWindowLikeMe > ifEmpty: > [ self > position: (RealEstateAgent initialFrameFor: self initialExtent: extent world: aWorld) topLeft ; > extent: extent. > self openAsIsIn: aWorld ] > ifNotEmptyDo: > [ : windows | > windows anyOne > expand ; > beKeyWindow ; > postAcceptBrowseFor: self ].! > > |
In reply to this post by commits-2
Guys! Deprecate such changes! Provide a fallback. Quite simple in this case. :-( Best, Marcel
|
No problem, but I always thought the purpose of deprecation was to be
polite to _external_ code and apps, giving them an opportunity to operate with their old code temporarily until they can get updated, by flipping a bit. #anyOpenWindowLikeMe is a private method used only by our IDE of which we control the code. I'm confused about when it is okay to delete a method vs. when I should deprecate... Best, Chris On Thu, Apr 5, 2018 at 2:36 AM, Marcel Taeumel <[hidden email]> wrote: > Guys! Deprecate such changes! Provide a fallback. Quite simple in this case. > :-( > > Best, > Marcel > > Am 04.04.2018 21:31:23 schrieb [hidden email] > <[hidden email]>: > > Chris Muller uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-cmm.1409.mcz > > ==================== Summary ==================== > > Name: Morphic-cmm.1409 > Author: cmm > Time: 4 April 2018, 2:30:02.510117 pm > UUID: 6d625668-7bfe-4baa-8c15-ea49525a34dd > Ancestors: Morphic-cmm.1408 > > Slightly better fix (thanks Tim) which uses the World passed-in to the > sender rather than the global World. > > =============== Diff against Morphic-cmm.1408 =============== > > Item was removed: > - ----- Method: SystemWindow>>anyOpenWindowLikeMe (in category 'open/close') > ----- > - anyOpenWindowLikeMe > - > - self class reuseWindows ifFalse: [ ^Array empty ]. > - ^ 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: SystemWindow>>anyOpenWindowLikeMeIn: (in category > 'open/close') ----- > + anyOpenWindowLikeMeIn: aPasteUpMorph > + self class reuseWindows ifFalse: [ ^Array empty ]. > + ^ SystemWindow > + windowsIn: aPasteUpMorph > + satisfying: > + [ : each | > + each model class = self model class > + and: [ (each model respondsTo: #representsSameBrowseeAs:) > + and: [ each model representsSameBrowseeAs: self model ] ] ] > + ! > > Item was changed: > ----- Method: SystemWindow>>openInWorld: (in category 'open/close') ----- > openInWorld: aWorld > "This msg and its callees result in the window being activeOnlyOnTop" > + ^ (self anyOpenWindowLikeMeIn: aWorld) > - ^ self anyOpenWindowLikeMe > ifEmpty: > [ self > bounds: (RealEstateAgent initialFrameFor: self world: aWorld) ; > openAsIsIn: aWorld ] > ifNotEmptyDo: > [ : windows | > windows anyOne > expand ; > beKeyWindow ; > postAcceptBrowseFor: self ].! > > 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 anyOpenWindowLikeMeIn: aWorld) > - ^ self anyOpenWindowLikeMe > ifEmpty: > [ self > position: (RealEstateAgent initialFrameFor: self initialExtent: extent > world: aWorld) topLeft ; > extent: extent. > self openAsIsIn: aWorld ] > ifNotEmptyDo: > [ : windows | > windows anyOne > expand ; > beKeyWindow ; > postAcceptBrowseFor: self ].! > > > > > |
Free forum by Nabble | Edit this page |