Browser does not work at all anymore... I fixed it but...
Smalltalk tools register: Browser as: #browser Smalltalk tools openClassBrowser PluggableListMorph was not robust enough Apparently when getListSelector returns a set (like messageList now in 3.0 then getList breaks getList "Answer the list to be displayed. Caches the returned list in the 'list' ivar" getListSelector == nil ifTrue: [^ #()]. list := model perform: getListSelector. list == nil ifTrue: [^ #()]. list := list collectWithIndex: [ :item :index | self wrapItem: item index: index ]. ^ list => fix the problem. I will produce a slice. And I think that the messageList returning a set is a mistake too. getList "Answer the list to be displayed. Caches the returned list in the 'list' ivar" getListSelector == nil ifTrue: [^ #()]. list := (model perform: getListSelector) asArray. list == nil ifTrue: [^ #()]. list := list collectWithIndex: [ :item :index | self wrapItem: item index: index ]. ^ list Stf
well well well messageList "Answer an Array of the message selectors of the currently selected message category, provided that the messageCategoryListIndex is in proper range. Otherwise, answer an empty Array If messageCategoryListIndex is found to be larger than the number of categories (it happens!), it is reset to zero." | sel | (sel := self messageCategoryListSelection) ifNil: [ ^ self classOrMetaClassOrganizer ifNil: [Array new] ifNotNil: [self classOrMetaClassOrganizer allMethodSelectors] ]. ^ (self classOrMetaClassOrganizer listAtCategoryNumber: messageCategoryListIndex) ifNil: [messageCategoryListIndex := 0. Array new] it looks like messageList or allMethodSelectors got changed and do not return anymore an indexable collection. So I will fix that too. Stef On Nov 24, 2013, at 9:24 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Smalltalk tools register: Browser as: #browser Smalltalk tools openClassBrowser
PluggableListMorph was not robust enough Apparently when getListSelector returns a set (like messageList now in 3.0 then getList breaks
getList "Answer the list to be displayed. Caches the returned list in the 'list' ivar" getListSelector == nil ifTrue: [^ #()]. list := model perform: getListSelector. list == nil ifTrue: [^ #()]. list := list collectWithIndex: [ :item :index | self wrapItem: item index: index ]. ^ list
=> fix the problem. I will produce a slice. And I think that the messageList returning a set is a mistake too.
getList "Answer the list to be displayed. Caches the returned list in the 'list' ivar" getListSelector == nil ifTrue: [^ #()]. list := (model perform: getListSelector) asArray. list == nil ifTrue: [^ #()]. list := list collectWithIndex: [ :item :index | self wrapItem: item index: index ]. ^ list
Stf
On 24 Nov 2013, at 21:31, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
well well well
Code that is not used breaks. I do not know how to change that. I really do not.
messageList "Answer an Array of the message selectors of the currently selected message category, provided that the messageCategoryListIndex is in proper range. Otherwise, answer an empty Array If messageCategoryListIndex is found to be larger than the number of categories (it happens!), it is reset to zero." | sel | (sel := self messageCategoryListSelection) ifNil: [ ^ self classOrMetaClassOrganizer ifNil: [Array new] ifNotNil: [self classOrMetaClassOrganizer allMethodSelectors] ].
^ (self classOrMetaClassOrganizer listAtCategoryNumber: messageCategoryListIndex) ifNil: [messageCategoryListIndex := 0. Array new]
it looks like messageList or allMethodSelectors got changed and do not return anymore an indexable collection. So I will fix that too.
Stef
On Nov 24, 2013, at 9:24 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Smalltalk tools register: Browser as: #browser Smalltalk tools openClassBrowser
PluggableListMorph was not robust enough Apparently when getListSelector returns a set (like messageList now in 3.0 then getList breaks
getList "Answer the list to be displayed. Caches the returned list in the 'list' ivar" getListSelector == nil ifTrue: [^ #()]. list := model perform: getListSelector. list == nil ifTrue: [^ #()]. list := list collectWithIndex: [ :item :index | self wrapItem: item index: index ]. ^ list
=> fix the problem. I will produce a slice. And I think that the messageList returning a set is a mistake too.
getList "Answer the list to be displayed. Caches the returned list in the 'list' ivar" getListSelector == nil ifTrue: [^ #()]. list := (model perform: getListSelector) asArray. list == nil ifTrue: [^ #()]. list := list collectWithIndex: [ :item :index | self wrapItem: item index: index ]. ^ list
Stf
On 24 Nov 2013, at 21:32, Marcus Denker <marcus.denker@inria.fr> wrote:
On 24 Nov 2013, at 21:31, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
well well well
Code that is not used breaks. I do not know how to change that. I really do not.
I do not think that it is realistic to keep the old Browser alive. It will mean that we have to change it for everything⦠Protocols already now. Later someone needs to change it to use RPackage instead of System Categories⦠this will be quite some work⦠Marcus
On 24 Nov 2013, at 21:52, Marcus Denker <marcus.denker@inria.fr> wrote:
On 24 Nov 2013, at 21:32, Marcus Denker <marcus.denker@inria.fr> wrote:
On 24 Nov 2013, at 21:31, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
well well well
Code that is not used breaks. I do not know how to change that. I really do not.
I do not think that it is realistic to keep the old Browser alive. It will mean that we have to change it for everything⦠Protocols already now. Later someone needs to change it to use RPackage instead of System Categories⦠this will be quite some workâ¦
and how will we get that debugged if we donât use it? I really canât do it. Itâs beyond my capabilities. Marcus
well well well
Code that is not used breaks. I do not know how to change that. I really do not.
I do not think that it is realistic to keep the old Browser alive. It will mean that we have to change it for everything⦠Protocols already now. Later someone needs to change it to use RPackage instead of System Categories⦠this will be quite some workâ¦
and how will we get that debugged if we donât use it?
But we use it :) I need it. did you look at the methods I sent? Categorizer>>allMethodSelectors "give a list of all method selectors." ^^^^^^^^^^^^^ ^ elementArray copy sort ***A list is not a set*** ClassOrganization>>allMethodSelectors "Oops no comments⦠no indication of types" ^ protocolOrganizer allMethods
well well well
Code that is not used breaks. I do not know how to change that. I really do not.
I do not think that it is realistic to keep the old Browser alive. It will mean that we have to change it for everything⦠Protocols already now. Later someone needs to change it to use RPackage instead of System Categories⦠this will be quite some workâ¦
Marcus
Marcus did you read my analysis until the end? Next time I will not post it. Did you see that this is not the Browser code the problem? but the fact that PluggableListMorph was confused because an invariant was violated. If protocols are not indexable then PluggableListMorph is fooled. Why Pluggable*****LIST*****Morph would have a work with Set? So it would be good that you do not systematically contradict what I'm saying because I changed a lot of things in this system and I will change many more. Right now I just got stuck on what I wanted to do. Stef
too me it looks like we are violating the fact that a list IS NOT A SET. Categorizer>>allMethodSelectors "give a list of all method selectors." ^ elementArray copy sort ClassOrganization>>allMethodSelectors ^ protocolOrganizer allMethods ProtocolOrganizer>>allMethods ^ self protocols gather: [:p | p methods ]. gather: aBlock "This method is kept for compatibility reasons, use flatCollect instead." ^ self flatCollect: aBlock. Note that it would be good to have a comment in this second method. Because now I do not know. initialize super initialize. protocols := IdentitySet new. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ allProtocol := AllProtocol protocolOrganizer: self. So I would suggest that allMethods return something with an order. Esteban??? ProtocolOrganizer>>allMethods ^ self protocols gather: [:p | p methods ]. => ProtocolOrganizer>>allMethods ^ (self protocols gather: [:p | p methods ]) asArray Stef On Nov 24, 2013, at 9:31 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
well well well
messageList "Answer an Array of the message selectors of the currently selected message category, provided that the messageCategoryListIndex is in proper range. Otherwise, answer an empty Array If messageCategoryListIndex is found to be larger than the number of categories (it happens!), it is reset to zero." | sel | (sel := self messageCategoryListSelection) ifNil: [ ^ self classOrMetaClassOrganizer ifNil: [Array new] ifNotNil: [self classOrMetaClassOrganizer allMethodSelectors] ].
^ (self classOrMetaClassOrganizer listAtCategoryNumber: messageCategoryListIndex) ifNil: [messageCategoryListIndex := 0. Array new]
it looks like messageList or allMethodSelectors got changed and do not return anymore an indexable collection. So I will fix that too.
Stef
On Nov 24, 2013, at 9:24 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Smalltalk tools register: Browser as: #browser Smalltalk tools openClassBrowser
PluggableListMorph was not robust enough Apparently when getListSelector returns a set (like messageList now in 3.0 then getList breaks
getList "Answer the list to be displayed. Caches the returned list in the 'list' ivar" getListSelector == nil ifTrue: [^ #()]. list := model perform: getListSelector. list == nil ifTrue: [^ #()]. list := list collectWithIndex: [ :item :index | self wrapItem: item index: index ]. ^ list
=> fix the problem. I will produce a slice. And I think that the messageList returning a set is a mistake too.
getList "Answer the list to be displayed. Caches the returned list in the 'list' ivar" getListSelector == nil ifTrue: [^ #()]. list := (model perform: getListSelector) asArray. list == nil ifTrue: [^ #()]. list := list collectWithIndex: [ :item :index | self wrapItem: item index: index ]. ^ list
Stf
participants (2)
-
Marcus Denker -
Stéphane Ducasse