Hi, anyone knows how to use NewList without icons. Background: I have a collection with 5000 entries, every entry is a list of 20 strings. Inspecting this collection works, but scrolling the left pane of the inspector window is awfully slow. This is unexpected, as the only changing visual parts are the collection indices. For exampel, inspect the following collection: (1 to:5000) collect:[:x | (1 to:20) collect:[:t| t asString] ]. Dragging the scrollbar (or only dragging the window) is slow. Ok, there are many entries, but now, change this method (return nil instead of accessing the cache) NewList>>#iconForItem:at: ^nil "^ iconCache at: anItem ifAbsentPut: [ (self model iconForItem: anItem at: anIndex) asMorph ]" scrolling is smooth. The problem is, accessing the iconCache calls #hash on anItem, which is an IndexedEyeElement and this calls hash on its index AND on the value (the string array). The funny thing is, eyeinspector does not provide any icons at all. Therefore, is there a way to create the NewList and tell it to NEVER ask for icons? regards Nicolai
On 21 May 2014, at 00:08, Nicolai Hess <nicolaihess@web.de> wrote:
Therefore, is there a way to create the NewList and tell it to NEVER ask for icons?
As far as I remember I did not implement this option :) But having a flag for that should not be too complicated to add ;) Good luck, Ben
I give up. I tried to find a place where to put such an option. But I just don't have a clue how all that works. The interaction between NewList, NewListModel, NewListAdapter, MorphicNewListAdapter and NewListRenderer. If I add an "providesIcon" option to NewListAdapter, it does not work on an the lists used in EyeInspector. If I add this option to MorphicNewListAdapter, it does not work for NewListExample. I don't think I have to add a instvar, setter and getter to three different classes just to make this work. Would it make more sense to create a subclass NewIconList? 2014-05-21 10:23 GMT+02:00 Benjamin <benjamin.vanryseghem.pharo@gmail.com>:
On 21 May 2014, at 00:08, Nicolai Hess <nicolaihess@web.de> wrote:
Therefore, is there a way to create the NewList and tell it to NEVER ask for icons?
As far as I remember I did not implement this option :)
But having a flag for that should not be too complicated to add ;)
Good luck, Ben
participants (2)
-
Benjamin -
Nicolai Hess