Tobias Pape uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-topa.563.mcz ==================== Summary ==================== Name: Tools-topa.563 Author: topa Time: 27 March 2015, 12:27:31.114 am UUID: 7fb2f85e-8ba3-4ec4-be83-3c9275f7f80b Ancestors: Tools-topa.562 Fix menu entry sort to actually match (intended) description =============== Diff against Tools-topa.562 =============== Item was changed: ----- Method: StringHolder>>menuBuildersFor:in: (in category '*Tools-pluggable menus') ----- menuBuildersFor: someMenus in: aClass "Find all builders and sort them by 1. Priority (default 500) 2. selector name 3. inheritance " ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | |ma mb pa pb| ma := a method. mb := b method. pa := self methodMenuPriority: ma. pb := self methodMenuPriority: mb. + pa <= pb or: [ - pa < pb or: [ pa = pb and: [ ma selector <= mb selector and: [ mb methodClass inheritsFrom: ma methodClass]]]] ! |
2015-03-27 0:27 GMT+01:00 <[hidden email]>: Tobias Pape uploaded a new version of Tools to project The Trunk: I don't understand this. pa <= pb = false ==> (pa = pb = false) so the whole or: block becomes dead code no? pa = pb and: [ |
2015-03-27 2:31 GMT+01:00 Nicolas Cellier <[hidden email]>:
Oh, but it already changed, never mind :)
|
Hi
On 27.03.2015, at 02:33, Nicolas Cellier <[hidden email]> wrote: > > > 2015-03-27 2:31 GMT+01:00 Nicolas Cellier <[hidden email]>: > > > 2015-03-27 0:27 GMT+01:00 <[hidden email]>: > Tobias Pape uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-topa.563.mcz > > ==================== Summary ==================== > > Name: Tools-topa.563 > Author: topa > Time: 27 March 2015, 12:27:31.114 am > UUID: 7fb2f85e-8ba3-4ec4-be83-3c9275f7f80b > Ancestors: Tools-topa.562 > > Fix menu entry sort to actually match (intended) description > > =============== Diff against Tools-topa.562 =============== > > Item was changed: > ----- Method: StringHolder>>menuBuildersFor:in: (in category '*Tools-pluggable menus') ----- > menuBuildersFor: someMenus in: aClass > "Find all builders and sort them by > 1. Priority (default 500) > 2. selector name > 3. inheritance > " > ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | > |ma mb pa pb| > ma := a method. > mb := b method. > pa := self methodMenuPriority: ma. > pb := self methodMenuPriority: mb. > + pa <= pb or: [ > - pa < pb or: [ > > I don't understand this. > pa <= pb = false ==> (pa = pb = false) > so the whole or: block becomes dead code no? > > Oh, but it already changed, never mind :) Thanks for watching, nevertheless :) Best -Tobias > > > pa = pb and: [ > ma selector <= mb selector and: [ > mb methodClass inheritsFrom: ma methodClass]]]] > ! > > > > > |
Free forum by Nabble | Edit this page |