Conseils for develop a grid

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Conseils for develop a grid

gerard alis
I´m developing a grid for my UIBuilder. For the moment show a few cells and columns.The rows area is a ScrollPane widget with TableLayout policy. The rows header is another panel.
In vertical scroll the behavior is correct, the rows scrolling and the header is fixed ->

http://img43.imageshack.us/i/capturadepantalla200911w.png/


my problem is in the horizontal scroll, in that case rows area scroll good, but obviosly the header columns dont "match" with the rows columns, only is a panel ->

http://img10.imageshack.us/i/capturadepantalla200911f.png/


I´m catching the "scrolling" event, but i dont have a position reference for relocate the rows header panel. The rows area position don´t change when is scrolled, is strange.

I hope to me to have expressed well…  :|
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Alexandre Bergel
This looks really cool!

Alexandre


On 18 Nov 2009, at 19:13, nullPointer wrote:

>
> I´m developing a grid for my UIBuilder. For the moment show a few  
> cells and
> columns.The rows area is a ScrollPane widget with TableLayout  
> policy. The
> rows header is another panel.
> In vertical scroll the behavior is correct, the rows scrolling and the
> header is fixed ->
>
> http://img43.imageshack.us/i/capturadepantalla200911w.png/
>
>
> my problem is in the horizontal scroll, in that case rows area  
> scroll good,
> but obviosly the header columns dont "match" with the rows columns,  
> only is
> a panel ->
>
> http://img10.imageshack.us/i/capturadepantalla200911f.png/
>
>
> I´m catching the "scrolling" event, but i dont have a position  
> reference for
> relocate the rows header panel. The rows area position don´t change  
> when is
> scrolled, is strange.
>
> I hope to me to have expressed well…  :|
> --
> View this message in context: http://n2.nabble.com/Conseils-for-develop-a-grid-tp4028690p4028690.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Alain Plantec-4
In reply to this post by gerard alis
Hi all,

The  left reference is given by
scroller left

Did you have a look at MorphTreeMorph. It seems that it is very near of
your grid.
www.squeaksource.com/Momo
It includes 2 examples.
LazyClassList new openOn: Object
see attached screenshot.
Cheers
Alain

nullPointer a écrit :

> I´m developing a grid for my UIBuilder. For the moment show a few cells and
> columns.The rows area is a ScrollPane widget with TableLayout policy. The
> rows header is another panel.
> In vertical scroll the behavior is correct, the rows scrolling and the
> header is fixed ->
>
> http://img43.imageshack.us/i/capturadepantalla200911w.png/
>
>
> my problem is in the horizontal scroll, in that case rows area scroll good,
> but obviosly the header columns dont "match" with the rows columns, only is
> a panel ->
>
> http://img10.imageshack.us/i/capturadepantalla200911f.png/
>
>
> I´m catching the "scrolling" event, but i dont have a position reference for
> relocate the rows header panel. The rows area position don´t change when is
> scrolled, is strange.
>
> I hope to me to have expressed well…  :|
>  

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Capture.png (118K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Schwab,Wilhelm K
In reply to this post by Alexandre Bergel
The cell types bother me just a little.  It takes some time to adjust to the concepts, but value adapters (and aspect value adapter in particular) are a nice way to let gui elements "think" in text and yet connect to anything.  Highly recommended.

Bill


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Alexandre Bergel
Sent: Wednesday, November 18, 2009 5:28 PM
To: [hidden email]
Subject: Re: [Pharo-project] Conseils for develop a grid

This looks really cool!

Alexandre


On 18 Nov 2009, at 19:13, nullPointer wrote:

>
> I´m developing a grid for my UIBuilder. For the moment show a few
> cells and columns.The rows area is a ScrollPane widget with
> TableLayout policy. The rows header is another panel.
> In vertical scroll the behavior is correct, the rows scrolling and the
> header is fixed ->
>
> http://img43.imageshack.us/i/capturadepantalla200911w.png/
>
>
> my problem is in the horizontal scroll, in that case rows area scroll
> good, but obviosly the header columns dont "match" with the rows
> columns, only is a panel ->
>
> http://img10.imageshack.us/i/capturadepantalla200911f.png/
>
>
> I´m catching the "scrolling" event, but i dont have a position
> reference for relocate the rows header panel. The rows area position
> don´t change when is scrolled, is strange.
>
> I hope to me to have expressed well.  :|
> --
> View this message in context:
> http://n2.nabble.com/Conseils-for-develop-a-grid-tp4028690p4028690.htm
> l Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

gerard alis
In reply to this post by Alain Plantec-4


The problem is than scroller left never change when scrollbar is scrolled. I´m seeing the state of scrollpane and don´t see a change in a var when is scrolled. My purpose with that is change position of row header to same X of rows panel.

Regards and thanks for the help :)

Alain Plantec-4 wrote
Hi all,

The  left reference is given by
scroller left

Did you have a look at MorphTreeMorph. It seems that it is very near of
your grid.
www.squeaksource.com/Momo
It includes 2 examples.
LazyClassList new openOn: Object
see attached screenshot.
Cheers
Alain

nullPointer a écrit :
> I´m developing a grid for my UIBuilder. For the moment show a few cells and
> columns.The rows area is a ScrollPane widget with TableLayout policy. The
> rows header is another panel.
> In vertical scroll the behavior is correct, the rows scrolling and the
> header is fixed ->
>
> http://img43.imageshack.us/i/capturadepantalla200911w.png/
>
>
> my problem is in the horizontal scroll, in that case rows area scroll good,
> but obviosly the header columns dont "match" with the rows columns, only is
> a panel ->
>
> http://img10.imageshack.us/i/capturadepantalla200911f.png/
>
>
> I´m catching the "scrolling" event, but i dont have a position reference for
> relocate the rows header panel. The rows area position don´t change when is
> scrolled, is strange.
>
> I hope to me to have expressed well…  :|
>  


 
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Alain Plantec-4
nullPointer a écrit :
>
> The problem is than scroller left never change when scrollbar is scrolled.
> I´m seeing the state of scrollpane and don´t see a change in a var when is
> scrolled. My purpose with that is change position of row header to same X of
> rows panel.
>  
Hi nullPointer,

argh, yes, you're right, sorry for this bad answer :(
The good answer is that you can use the scroller offset.
In order to update the position of the header when the horizontal
scrollbar is changed,
you can redefine Scrollpane>>hScrollBarValue:

YourGridClass>>hScrollBarValue: scrollValue
    super hScrollBarValue: scrollValue.
    self updateHeader "makes use of 'scroller offset x' in order to
change header position"

hope that it will help this time.

Cheers
Alain



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

gerard alis

Many many thanks. I didn´t see that property.

PD. I know of existence of another "DataSet" morphs. The problem is the integration in my UIBuilder. Really i prefer than all widgets working of same way, without differences in behavior and public interfaces of ones respect others.

Regards, and many thanks again :)


Alain Plantec-4 wrote
nullPointer a écrit :
>
> The problem is than scroller left never change when scrollbar is scrolled.
> I´m seeing the state of scrollpane and don´t see a change in a var when is
> scrolled. My purpose with that is change position of row header to same X of
> rows panel.
>  
Hi nullPointer,

argh, yes, you're right, sorry for this bad answer :(
The good answer is that you can use the scroller offset.
In order to update the position of the header when the horizontal
scrollbar is changed,
you can redefine Scrollpane>>hScrollBarValue:

YourGridClass>>hScrollBarValue: scrollValue
    super hScrollBarValue: scrollValue.
    self updateHeader "makes use of 'scroller offset x' in order to
change header position"

hope that it will help this time.

Cheers
Alain



_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Alain Plantec-4
nullPointer a écrit :
> Many many thanks. I didn´t see that property.
>
> PD. I know of existence of another "DataSet" morphs. The problem is the
> integration in my UIBuilder. Really i prefer than all widgets working of
> same way, without differences in behavior and public interfaces of ones
> respect others.
>  
Of course, it is better to have uniform interfaces.
If you speak about MorphTreeMorph, just ask, I can adapt it to your need.
Cheers
Alain

> Regards, and many thanks again :)
>
>
>
> Alain Plantec-4 wrote:
>  
>> nullPointer a écrit :
>>    
>>> The problem is than scroller left never change when scrollbar is
>>> scrolled.
>>> I´m seeing the state of scrollpane and don´t see a change in a var when
>>> is
>>> scrolled. My purpose with that is change position of row header to same X
>>> of
>>> rows panel.
>>>  
>>>      
>> Hi nullPointer,
>>
>> argh, yes, you're right, sorry for this bad answer :(
>> The good answer is that you can use the scroller offset.
>> In order to update the position of the header when the horizontal
>> scrollbar is changed,
>> you can redefine Scrollpane>>hScrollBarValue:
>>
>> YourGridClass>>hScrollBarValue: scrollValue
>>     super hScrollBarValue: scrollValue.
>>     self updateHeader "makes use of 'scroller offset x' in order to
>> change header position"
>>
>> hope that it will help this time.
>>
>> Cheers
>> Alain
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>    
>
>  


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

gerard alis
In reply to this post by gerard alis
I´m continue working on that widget. Now works in design time, integrated in UIBuilder tool.

Adding rows ->
     http://www.youtube.com/watch?v=Dt0yz0JyBCg

Master detail ->
     http://www.youtube.com/watch?v=FTW9Byqdgbk

My main problem now is the speed. Is very very slow; one minute is needed for load 5000 rows (!!!)

With MessageTally I see the next response...  



 - 81732 tallies, 82014 msec.

**Tree**
--------------------------------
Process: (40s)  3296: nil
--------------------------------
50.3% {41253ms} CLGrid>>dataSource:
  44.5% {36496ms} CLGrid>>addRow
    |21.7% {17797ms} CLScrollPanelContainer(Morph)>>addMorphBack:
    |  |21.7% {17797ms} CLScrollPanelContainer(CLPanel)>>privateAddMorph:atIndex:
    |  |  21.6% {17715ms} CLScrollPanelContainer(Morph)>>privateAddMorph:atIndex:
    |  |    13.8% {11318ms} CLScrollPanelContainer(Morph)>>privateInvalidateMorph:
    |  |      |13.5% {11072ms} CLGridRow(Morph)>>fullBounds
    |  |      |  13.5% {11072ms} CLGridRow(Morph)>>doLayoutIn:
    |  |      |    8.6% {7053ms} TableLayout>>layout:in:
    |  |      |      |8.6% {7053ms} TableLayout>>layoutLeftToRight:in:
    |  |      |      |  5.8% {4757ms} CLGridCell(Morph)>>layoutInBounds:
    |  |      |      |    |5.3% {4347ms} CLGridCell(Morph)>>bounds:
    |  |      |      |    |  2.6% {2132ms} CLGridCell(Morph)>>position:
    |  |      |      |    |    |1.5% {1230ms} CLGridCell(Morph)>>invalidRect:
    |  |      |      |    |    |  1.5% {1230ms} CLGridCell(Morph)>>invalidRect:from:
    |  |      |      |    |    |    1.5% {1230ms} CLGridRow(Morph)>>invalidRect:from:
    |  |      |      |    |    |      1.1% {902ms} CLScrollPanelContainer(Morph)>>invalidRect:from:
    |  |      |      |    |  2.6% {2132ms} CLGridCell>>extent:
    |  |      |      |    |    2.4% {1968ms} CLGridCell(Morph)>>extent:
    |  |      |      |    |      1.6% {1312ms} CLGridCell(Morph)>>changed
    |  |      |      |  2.7% {2214ms} CLGridCell(Morph)>>minExtent
    |  |      |    4.2% {3445ms} CLGridRow(Morph)>>adjustLayoutBounds
    |  |      |      3.9% {3199ms} CLGridRow(Morph)>>submorphBounds
    |  |      |        3.9% {3199ms} CLGridCell(Morph)>>fullBounds
    |  |      |          3.6% {2953ms} CLGridCell(Morph)>>doLayoutIn:
    |  |      |            2.0% {1640ms} TableLayout>>layout:in:
    |  |      |              1.8% {1476ms} TableLayout>>layoutTopToBottom:in:
    |  |    7.7% {6315ms} CLGridRow(Morph)>>intoWorld:
    |  |      7.7% {6315ms} CLGridCell(Morph)>>intoWorld:
    |  |        7.6% {6233ms} CLCheckButton(Morph)>>intoWorld:
    |  |          7.4% {6069ms} PasteUpMorph>>startStepping:
    |  |            7.4% {6069ms} PasteUpMorph>>startStepping:at:selector:arguments:stepTime:
    |  |              7.4% {6069ms} WorldState>>startStepping:at:selector:arguments:stepTime:
    |  |                7.4% {6069ms} WorldState>>stopStepping:selector:
    |  |                  5.8% {4757ms} Heap(SequenceableCollection)>>select:
    |  |                    |3.9% {3199ms} Heap>>at:
    |  |                    |1.8% {1476ms} primitives
    |  |                  1.6% {1312ms} primitives
    |14.8% {12138ms} CLGridRow>>buildCellsStructureFrom:
    |  |14.8% {12138ms} CLGridRow>>addCell:
    |  |  14.8% {12138ms} CLGridRow>>pvtAddCell:ofType:
    |  |    5.7% {4675ms} CLGridCell>>setColumn:
    |  |      |5.7% {4675ms} CLGridCell>>pvtBuildValueControl
    |  |      |  3.0% {2460ms} CLLabel class(Behavior)>>new
    |  |      |    2.0% {1640ms} CLCheckButton(CheckboxButtonMorph)>>initialize
    |  |      |      |1.1% {902ms} CLCheckButton>>enabled:
    |  |      |      |  1.1% {902ms} CLCheckButton(CheckboxButtonMorph)>>enabled:
    |  |      |    1.0% {820ms} CLLabel>>initialize
    |  |    4.0% {3281ms} CLGridCell class(Behavior)>>new
    |  |      |4.0% {3281ms} CLGridCell>>initialize
    |  |    2.4% {1968ms} CLGridCell(Morph)>>width:
    |  |      |2.4% {1968ms} CLGridCell>>extent:
    |  |      |  2.1% {1722ms} CLGridCell(Morph)>>extent:
    |  |      |    1.9% {1558ms} CLGridCell(Morph)>>changed
    |  |      |      1.4% {1148ms} CLGridCell(Morph)>>privateFullBounds
    |  |    1.4% {1148ms} CLGridCell(Morph)>>borderColor:
    |  |      1.3% {1066ms} CLGridCell(Morph)>>changed
    |  |        1.3% {1066ms} CLGridCell(Morph)>>privateFullBounds
    |5.4% {4429ms} CLGridRow(CLPanel)>>color:
    |  |5.4% {4429ms} CLGridRow(Morph)>>color:
    |  |  5.4% {4429ms} CLGridRow(Morph)>>changed
    |  |    5.4% {4429ms} CLGridRow(Morph)>>privateFullBounds
    |  |      5.2% {4265ms} CLGridRow(Morph)>>submorphBounds
    |  |        5.2% {4265ms} CLGridCell(Morph)>>fullBounds
    |  |          4.8% {3937ms} CLGridCell(Morph)>>doLayoutIn:
    |  |            3.3% {2706ms} TableLayout>>layout:in:
    |  |              3.1% {2542ms} TableLayout>>layoutTopToBottom:in:
    |  |                1.8% {1476ms} CLLabel(Morph)>>layoutInBounds:
    |1.3% {1066ms} CLGridRow class(Behavior)>>new
    |  1.3% {1066ms} CLGridRow>>initialize
  5.6% {4593ms} CLGridRow>>listObject:
    5.4% {4429ms} CLGridCell>>value:
      4.3% {3527ms} CLLabel>>value:
        |4.3% {3527ms} CLLabel>>text:
        |  4.3% {3527ms} CLLabel(StringMorph)>>contents:
        |    4.3% {3527ms} CLLabel(StringMorph)>>fitContents
        |      4.1% {3363ms} CLLabel>>extent:
        |        4.0% {3281ms} CLLabel(Morph)>>extent:
        |          3.4% {2788ms} CLLabel(Morph)>>changed
        |            3.2% {2624ms} CLLabel(Morph)>>invalidRect:
        |              3.2% {2624ms} CLLabel(Morph)>>invalidRect:from:
        |                3.1% {2542ms} CLGridCell(Morph)>>invalidRect:from:
        |                  2.7% {2214ms} CLGridRow(Morph)>>invalidRect:from:
        |                    2.4% {1968ms} CLScrollPanelContainer(Morph)>>invalidRect:from:
        |                      2.2% {1804ms} TransformMorph>>invalidRect:from:
        |                        1.4% {1148ms} TransformMorph(Morph)>>invalidRect:from:
        |                          1.4% {1148ms} CLScrollpanel(Morph)>>invalidRect:from:
        |                            1.2% {984ms} CLGrid(Morph)>>invalidRect:from:
      1.1% {902ms} CLCheckButton>>value:
        1.1% {902ms} CLCheckButton(CheckboxButtonMorph)>>state:
30.5% {25014ms} CLGrid(Morph)>>openInWindowLabeled:
  30.5% {25014ms} CLGrid(Morph)>>openInWindowLabeled:inWorld:
    15.5% {12712ms} PasteUpMorph(Morph)>>addMorph:
      |15.5% {12712ms} PasteUpMorph>>addMorphFront:
      |  15.5% {12712ms} PasteUpMorph(Morph)>>addMorphInFrontOfLayer:
      |    15.5% {12712ms} PasteUpMorph(Morph)>>addMorph:inFrontOf:
      |      15.5% {12712ms} PasteUpMorph(Morph)>>privateAddMorph:atIndex:
      |        15.5% {12712ms} SystemWindow(Morph)>>intoWorld:
      |          15.5% {12712ms} CLGrid(Morph)>>intoWorld:
      |            15.5% {12712ms} CLGridRowHeader(Morph)>>intoWorld:
      |              15.5% {12712ms} CLGridCellHeader(Morph)>>intoWorld:
      |                15.5% {12712ms} CLScrollPanelContainer(Morph)>>intoWorld:
      |                  15.5% {12712ms} CLGridRow(Morph)>>intoWorld:
      |                    15.4% {12630ms} CLGridCell(Morph)>>intoWorld:
      |                      15.4% {12630ms} CLCheckButton(Morph)>>intoWorld:
      |                        15.3% {12548ms} PasteUpMorph>>startStepping:
      |                          15.3% {12548ms} PasteUpMorph>>startStepping:at:selector:arguments:stepTime:
      |                            15.3% {12548ms} WorldState>>startStepping:at:selector:arguments:stepTime:
      |                              15.3% {12548ms} WorldState>>stopStepping:selector:
      |                                9.1% {7463ms} Heap(SequenceableCollection)>>select:
      |                                  |6.4% {5249ms} Heap>>at:
      |                                  |2.7% {2214ms} primitives
      |                                3.4% {2788ms} Heap(Collection)>>removeAll:
      |                                  |3.4% {2788ms} Heap(Collection)>>remove:
      |                                  |  3.4% {2788ms} Heap>>remove:ifAbsent:
      |                                  |    1.7% {1394ms} StepMessage(MessageSend)>>=
      |                                  |      |1.7% {1394ms} primitives
      |                                  |    1.7% {1394ms} primitives
      |                                2.8% {2296ms} primitives
    14.8% {12138ms} PasteUpMorph>>startSteppingSubmorphsOf:
      14.6% {11974ms} CLCheckButton(Morph)>>arrangeToStartSteppingIn:
        14.4% {11810ms} PasteUpMorph>>startStepping:
          14.4% {11810ms} PasteUpMorph>>startStepping:at:selector:arguments:stepTime:
            14.4% {11810ms} WorldState>>startStepping:at:selector:arguments:stepTime:
              14.4% {11810ms} WorldState>>stopStepping:selector:
                9.1% {7463ms} Heap(SequenceableCollection)>>select:
                  |6.5% {5331ms} Heap>>at:
                  |2.5% {2050ms} primitives
                2.9% {2378ms} Heap(Collection)>>removeAll:
                  |2.9% {2378ms} Heap(Collection)>>remove:
                  |  2.9% {2378ms} Heap>>remove:ifAbsent:
                  |    1.5% {1230ms} primitives
                  |    1.4% {1148ms} StepMessage(MessageSend)>>=
                2.4% {1968ms} primitives
7.9% {6479ms} CLGrid>>relocatePanels
  7.9% {6479ms} CLScrollPanelContainer(Morph)>>position:
    7.4% {6069ms} CLScrollPanelContainer(Morph)>>fullBounds
      7.4% {6069ms} CLScrollPanelContainer(Morph)>>doLayoutIn:
        7.4% {6069ms} TableLayout>>layout:in:
          7.4% {6069ms} TableLayout>>layoutTopToBottom:in:
            4.3% {3527ms} CLGridRow(Morph)>>minExtent
              |4.1% {3363ms} TableLayout>>minExtentOf:in:
              |  4.1% {3363ms} TableLayout>>minExtentHorizontal:
              |    4.0% {3281ms} CLGridCell(Morph)>>minExtent
              |      1.9% {1558ms} CLGridCell(Morph)>>fullBounds
              |        |1.8% {1476ms} CLGridCell(Morph)>>doLayoutIn:
              |      1.3% {1066ms} TableLayout>>minExtentOf:in:
              |        1.2% {984ms} TableLayout>>minExtentVertical:
              |          1.1% {902ms} CLLabel(Morph)>>minExtent
            3.1% {2542ms} CLGridRow(Morph)>>layoutInBounds:
              2.4% {1968ms} CLGridRow(Morph)>>doLayoutIn:
                1.9% {1558ms} TableLayout>>layout:in:
                  1.9% {1558ms} TableLayout>>layoutLeftToRight:in:
                    1.7% {1394ms} CLGridCell(Morph)>>minExtent

**Leaves**
16.8% {13778ms} Heap>>at:
7.0% {5741ms} WeakActionSequence(SequenceableCollection)>>select:
6.9% {5659ms} Array(SequenceableCollection)>>identityIndexOf:ifAbsent:
6.8% {5577ms} WorldState>>stopStepping:selector:
3.7% {3035ms} Array(SequenceableCollection)>>identityIndexOf:
3.3% {2706ms} SmallIdentityDictionary(SmallDictionary)>>at:ifAbsent:
3.3% {2706ms} MorphExtension>>valueOfProperty:ifAbsent:
3.2% {2624ms} Heap>>remove:ifAbsent:
3.1% {2542ms} StepMessage(MessageSend)>>=
2.4% {1968ms} SmallIdentityDictionary>>findIndexForKey:
1.7% {1394ms} Rectangle>>setOrigin:corner:
1.6% {1312ms} Point>>+
1.6% {1312ms} Rectangle class>>origin:corner:
1.4% {1148ms} RectangleMorph(Morph)>>valueOfProperty:ifAbsent:
1.3% {1066ms} Point>>-

**Memory**
        old +20,789,788 bytes
        young +112,272 bytes
        used +20,902,060 bytes
        free -1,073,416 bytes

**GCs**
        full 2 totalling 495ms (1.0% uptime), avg 248.0ms
        incr 45275 totalling 15,800ms (19.0% uptime), avg 0.0ms
        tenures 715 (avg 63 GCs/tenure)
        root table 0 overflows

Perhaps I don´t interpret correctly that result. I understand than the more slow is the UI actions, when I add the cells in each row ( #buildCellsStructure ). Exists some way for accelerate the UI moves? Is possible stop the morphs events and only restart when is all builded?

I did try reduce the slow sensation loading the rows in another thread (#fork), but the UI crushes, and appears a red rectangle with a yellow cross. Exists some way for use work with UI in another threads?


Regards
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Alain Plantec-4
nullPointer a écrit :
> I´m continue working on that widget. Now works in design time, integrated in
> UIBuilder tool.
>
> Adding rows ->
>      http://www.youtube.com/watch?v=Dt0yz0JyBCg
>
> Master detail ->
>      http://www.youtube.com/watch?v=FTW9Byqdgbk
>  
very cool work
> My main problem now is the speed. Is very very slow; one minute is needed
> for load 5000 rows (!!!)
>  
well, not so bad!
5000 rows means a lot of data, maybe Morphic is not the good ui framework
for applications that manage such amount of data, at least in its
current state.
It seems that you're using the stepping  mechanism, it is time consuming.
also the layout managing and invalid areas redrawing.
Cheers
Alain

> With MessageTally I see the next response...  
>
>
>
>  - 81732 tallies, 82014 msec.
>
> **Tree**
> --------------------------------
> Process: (40s)  3296: nil
> --------------------------------
> 50.3% {41253ms} CLGrid>>dataSource:
>   44.5% {36496ms} CLGrid>>addRow
>     |21.7% {17797ms} CLScrollPanelContainer(Morph)>>addMorphBack:
>     |  |21.7% {17797ms}
> CLScrollPanelContainer(CLPanel)>>privateAddMorph:atIndex:
>     |  |  21.6% {17715ms}
> CLScrollPanelContainer(Morph)>>privateAddMorph:atIndex:
>     |  |    13.8% {11318ms}
> CLScrollPanelContainer(Morph)>>privateInvalidateMorph:
>     |  |      |13.5% {11072ms} CLGridRow(Morph)>>fullBounds
>     |  |      |  13.5% {11072ms} CLGridRow(Morph)>>doLayoutIn:
>     |  |      |    8.6% {7053ms} TableLayout>>layout:in:
>     |  |      |      |8.6% {7053ms} TableLayout>>layoutLeftToRight:in:
>     |  |      |      |  5.8% {4757ms} CLGridCell(Morph)>>layoutInBounds:
>     |  |      |      |    |5.3% {4347ms} CLGridCell(Morph)>>bounds:
>     |  |      |      |    |  2.6% {2132ms} CLGridCell(Morph)>>position:
>     |  |      |      |    |    |1.5% {1230ms}
> CLGridCell(Morph)>>invalidRect:
>     |  |      |      |    |    |  1.5% {1230ms}
> CLGridCell(Morph)>>invalidRect:from:
>     |  |      |      |    |    |    1.5% {1230ms}
> CLGridRow(Morph)>>invalidRect:from:
>     |  |      |      |    |    |      1.1% {902ms}
> CLScrollPanelContainer(Morph)>>invalidRect:from:
>     |  |      |      |    |  2.6% {2132ms} CLGridCell>>extent:
>     |  |      |      |    |    2.4% {1968ms} CLGridCell(Morph)>>extent:
>     |  |      |      |    |      1.6% {1312ms} CLGridCell(Morph)>>changed
>     |  |      |      |  2.7% {2214ms} CLGridCell(Morph)>>minExtent
>     |  |      |    4.2% {3445ms} CLGridRow(Morph)>>adjustLayoutBounds
>     |  |      |      3.9% {3199ms} CLGridRow(Morph)>>submorphBounds
>     |  |      |        3.9% {3199ms} CLGridCell(Morph)>>fullBounds
>     |  |      |          3.6% {2953ms} CLGridCell(Morph)>>doLayoutIn:
>     |  |      |            2.0% {1640ms} TableLayout>>layout:in:
>     |  |      |              1.8% {1476ms}
> TableLayout>>layoutTopToBottom:in:
>     |  |    7.7% {6315ms} CLGridRow(Morph)>>intoWorld:
>     |  |      7.7% {6315ms} CLGridCell(Morph)>>intoWorld:
>     |  |        7.6% {6233ms} CLCheckButton(Morph)>>intoWorld:
>     |  |          7.4% {6069ms} PasteUpMorph>>startStepping:
>     |  |            7.4% {6069ms}
> PasteUpMorph>>startStepping:at:selector:arguments:stepTime:
>     |  |              7.4% {6069ms}
> WorldState>>startStepping:at:selector:arguments:stepTime:
>     |  |                7.4% {6069ms} WorldState>>stopStepping:selector:
>     |  |                  5.8% {4757ms}
> Heap(SequenceableCollection)>>select:
>     |  |                    |3.9% {3199ms} Heap>>at:
>     |  |                    |1.8% {1476ms} primitives
>     |  |                  1.6% {1312ms} primitives
>     |14.8% {12138ms} CLGridRow>>buildCellsStructureFrom:
>     |  |14.8% {12138ms} CLGridRow>>addCell:
>     |  |  14.8% {12138ms} CLGridRow>>pvtAddCell:ofType:
>     |  |    5.7% {4675ms} CLGridCell>>setColumn:
>     |  |      |5.7% {4675ms} CLGridCell>>pvtBuildValueControl
>     |  |      |  3.0% {2460ms} CLLabel class(Behavior)>>new
>     |  |      |    2.0% {1640ms}
> CLCheckButton(CheckboxButtonMorph)>>initialize
>     |  |      |      |1.1% {902ms} CLCheckButton>>enabled:
>     |  |      |      |  1.1% {902ms}
> CLCheckButton(CheckboxButtonMorph)>>enabled:
>     |  |      |    1.0% {820ms} CLLabel>>initialize
>     |  |    4.0% {3281ms} CLGridCell class(Behavior)>>new
>     |  |      |4.0% {3281ms} CLGridCell>>initialize
>     |  |    2.4% {1968ms} CLGridCell(Morph)>>width:
>     |  |      |2.4% {1968ms} CLGridCell>>extent:
>     |  |      |  2.1% {1722ms} CLGridCell(Morph)>>extent:
>     |  |      |    1.9% {1558ms} CLGridCell(Morph)>>changed
>     |  |      |      1.4% {1148ms} CLGridCell(Morph)>>privateFullBounds
>     |  |    1.4% {1148ms} CLGridCell(Morph)>>borderColor:
>     |  |      1.3% {1066ms} CLGridCell(Morph)>>changed
>     |  |        1.3% {1066ms} CLGridCell(Morph)>>privateFullBounds
>     |5.4% {4429ms} CLGridRow(CLPanel)>>color:
>     |  |5.4% {4429ms} CLGridRow(Morph)>>color:
>     |  |  5.4% {4429ms} CLGridRow(Morph)>>changed
>     |  |    5.4% {4429ms} CLGridRow(Morph)>>privateFullBounds
>     |  |      5.2% {4265ms} CLGridRow(Morph)>>submorphBounds
>     |  |        5.2% {4265ms} CLGridCell(Morph)>>fullBounds
>     |  |          4.8% {3937ms} CLGridCell(Morph)>>doLayoutIn:
>     |  |            3.3% {2706ms} TableLayout>>layout:in:
>     |  |              3.1% {2542ms} TableLayout>>layoutTopToBottom:in:
>     |  |                1.8% {1476ms} CLLabel(Morph)>>layoutInBounds:
>     |1.3% {1066ms} CLGridRow class(Behavior)>>new
>     |  1.3% {1066ms} CLGridRow>>initialize
>   5.6% {4593ms} CLGridRow>>listObject:
>     5.4% {4429ms} CLGridCell>>value:
>       4.3% {3527ms} CLLabel>>value:
>         |4.3% {3527ms} CLLabel>>text:
>         |  4.3% {3527ms} CLLabel(StringMorph)>>contents:
>         |    4.3% {3527ms} CLLabel(StringMorph)>>fitContents
>         |      4.1% {3363ms} CLLabel>>extent:
>         |        4.0% {3281ms} CLLabel(Morph)>>extent:
>         |          3.4% {2788ms} CLLabel(Morph)>>changed
>         |            3.2% {2624ms} CLLabel(Morph)>>invalidRect:
>         |              3.2% {2624ms} CLLabel(Morph)>>invalidRect:from:
>         |                3.1% {2542ms} CLGridCell(Morph)>>invalidRect:from:
>         |                  2.7% {2214ms} CLGridRow(Morph)>>invalidRect:from:
>         |                    2.4% {1968ms}
> CLScrollPanelContainer(Morph)>>invalidRect:from:
>         |                      2.2% {1804ms}
> TransformMorph>>invalidRect:from:
>         |                        1.4% {1148ms}
> TransformMorph(Morph)>>invalidRect:from:
>         |                          1.4% {1148ms}
> CLScrollpanel(Morph)>>invalidRect:from:
>         |                            1.2% {984ms}
> CLGrid(Morph)>>invalidRect:from:
>       1.1% {902ms} CLCheckButton>>value:
>         1.1% {902ms} CLCheckButton(CheckboxButtonMorph)>>state:
> 30.5% {25014ms} CLGrid(Morph)>>openInWindowLabeled:
>   30.5% {25014ms} CLGrid(Morph)>>openInWindowLabeled:inWorld:
>     15.5% {12712ms} PasteUpMorph(Morph)>>addMorph:
>       |15.5% {12712ms} PasteUpMorph>>addMorphFront:
>       |  15.5% {12712ms} PasteUpMorph(Morph)>>addMorphInFrontOfLayer:
>       |    15.5% {12712ms} PasteUpMorph(Morph)>>addMorph:inFrontOf:
>       |      15.5% {12712ms} PasteUpMorph(Morph)>>privateAddMorph:atIndex:
>       |        15.5% {12712ms} SystemWindow(Morph)>>intoWorld:
>       |          15.5% {12712ms} CLGrid(Morph)>>intoWorld:
>       |            15.5% {12712ms} CLGridRowHeader(Morph)>>intoWorld:
>       |              15.5% {12712ms} CLGridCellHeader(Morph)>>intoWorld:
>       |                15.5% {12712ms}
> CLScrollPanelContainer(Morph)>>intoWorld:
>       |                  15.5% {12712ms} CLGridRow(Morph)>>intoWorld:
>       |                    15.4% {12630ms} CLGridCell(Morph)>>intoWorld:
>       |                      15.4% {12630ms}
> CLCheckButton(Morph)>>intoWorld:
>       |                        15.3% {12548ms} PasteUpMorph>>startStepping:
>       |                          15.3% {12548ms}
> PasteUpMorph>>startStepping:at:selector:arguments:stepTime:
>       |                            15.3% {12548ms}
> WorldState>>startStepping:at:selector:arguments:stepTime:
>       |                              15.3% {12548ms}
> WorldState>>stopStepping:selector:
>       |                                9.1% {7463ms}
> Heap(SequenceableCollection)>>select:
>       |                                  |6.4% {5249ms} Heap>>at:
>       |                                  |2.7% {2214ms} primitives
>       |                                3.4% {2788ms}
> Heap(Collection)>>removeAll:
>       |                                  |3.4% {2788ms}
> Heap(Collection)>>remove:
>       |                                  |  3.4% {2788ms}
> Heap>>remove:ifAbsent:
>       |                                  |    1.7% {1394ms}
> StepMessage(MessageSend)>>=
>       |                                  |      |1.7% {1394ms} primitives
>       |                                  |    1.7% {1394ms} primitives
>       |                                2.8% {2296ms} primitives
>     14.8% {12138ms} PasteUpMorph>>startSteppingSubmorphsOf:
>       14.6% {11974ms} CLCheckButton(Morph)>>arrangeToStartSteppingIn:
>         14.4% {11810ms} PasteUpMorph>>startStepping:
>           14.4% {11810ms}
> PasteUpMorph>>startStepping:at:selector:arguments:stepTime:
>             14.4% {11810ms}
> WorldState>>startStepping:at:selector:arguments:stepTime:
>               14.4% {11810ms} WorldState>>stopStepping:selector:
>                 9.1% {7463ms} Heap(SequenceableCollection)>>select:
>                   |6.5% {5331ms} Heap>>at:
>                   |2.5% {2050ms} primitives
>                 2.9% {2378ms} Heap(Collection)>>removeAll:
>                   |2.9% {2378ms} Heap(Collection)>>remove:
>                   |  2.9% {2378ms} Heap>>remove:ifAbsent:
>                   |    1.5% {1230ms} primitives
>                   |    1.4% {1148ms} StepMessage(MessageSend)>>=
>                 2.4% {1968ms} primitives
> 7.9% {6479ms} CLGrid>>relocatePanels
>   7.9% {6479ms} CLScrollPanelContainer(Morph)>>position:
>     7.4% {6069ms} CLScrollPanelContainer(Morph)>>fullBounds
>       7.4% {6069ms} CLScrollPanelContainer(Morph)>>doLayoutIn:
>         7.4% {6069ms} TableLayout>>layout:in:
>           7.4% {6069ms} TableLayout>>layoutTopToBottom:in:
>             4.3% {3527ms} CLGridRow(Morph)>>minExtent
>               |4.1% {3363ms} TableLayout>>minExtentOf:in:
>               |  4.1% {3363ms} TableLayout>>minExtentHorizontal:
>               |    4.0% {3281ms} CLGridCell(Morph)>>minExtent
>               |      1.9% {1558ms} CLGridCell(Morph)>>fullBounds
>               |        |1.8% {1476ms} CLGridCell(Morph)>>doLayoutIn:
>               |      1.3% {1066ms} TableLayout>>minExtentOf:in:
>               |        1.2% {984ms} TableLayout>>minExtentVertical:
>               |          1.1% {902ms} CLLabel(Morph)>>minExtent
>             3.1% {2542ms} CLGridRow(Morph)>>layoutInBounds:
>               2.4% {1968ms} CLGridRow(Morph)>>doLayoutIn:
>                 1.9% {1558ms} TableLayout>>layout:in:
>                   1.9% {1558ms} TableLayout>>layoutLeftToRight:in:
>                     1.7% {1394ms} CLGridCell(Morph)>>minExtent
>
> **Leaves**
> 16.8% {13778ms} Heap>>at:
> 7.0% {5741ms} WeakActionSequence(SequenceableCollection)>>select:
> 6.9% {5659ms} Array(SequenceableCollection)>>identityIndexOf:ifAbsent:
> 6.8% {5577ms} WorldState>>stopStepping:selector:
> 3.7% {3035ms} Array(SequenceableCollection)>>identityIndexOf:
> 3.3% {2706ms} SmallIdentityDictionary(SmallDictionary)>>at:ifAbsent:
> 3.3% {2706ms} MorphExtension>>valueOfProperty:ifAbsent:
> 3.2% {2624ms} Heap>>remove:ifAbsent:
> 3.1% {2542ms} StepMessage(MessageSend)>>=
> 2.4% {1968ms} SmallIdentityDictionary>>findIndexForKey:
> 1.7% {1394ms} Rectangle>>setOrigin:corner:
> 1.6% {1312ms} Point>>+
> 1.6% {1312ms} Rectangle class>>origin:corner:
> 1.4% {1148ms} RectangleMorph(Morph)>>valueOfProperty:ifAbsent:
> 1.3% {1066ms} Point>>-
>
> **Memory**
> old +20,789,788 bytes
> young +112,272 bytes
> used +20,902,060 bytes
> free -1,073,416 bytes
>
> **GCs**
> full 2 totalling 495ms (1.0% uptime), avg 248.0ms
> incr 45275 totalling 15,800ms (19.0% uptime), avg 0.0ms
> tenures 715 (avg 63 GCs/tenure)
> root table 0 overflows
>
> Perhaps I don´t interpret correctly that result. I understand than the more
> slow is the UI actions, when I add the cells in each row (
> #buildCellsStructure ). Exists some way for accelerate the UI moves? Is
> possible stop the morphs events and only restart when is all builded?
>
> I did try reduce the slow sensation loading the rows in another thread
> (#fork), but the UI crushes, and appears a red rectangle with a yellow
> cross. Exists some way for use work with UI in another threads?
>
>
> Regards
>
>  


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

gerard alis
Then, there is not way of to improve much more that speed. I want use Pharo for commercial apps too, and surely need load lots of data.

>It seems that you're using the stepping  mechanism, it is time consuming.
>also the layout managing and invalid areas redrawing.

Is possible fix that?
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Stéphane Ducasse

On Feb 7, 2010, at 9:21 AM, nullPointer wrote:

>
> Then, there is not way of to improve much more that speed. I want use Pharo
> for commercial apps too, and surely need load lots of data.

I think that there are always space to improve.
This is just that we should look at what we are doing in a different way.

>> It seems that you're using the stepping  mechanism, it is time consuming.

Yes stepping is not the way to go
>> also the layout managing and invalid areas redrawing.


do you redraw even the not visible cells?

>
> Is possible fix that?
> --
> View this message in context: http://n4.nabble.com/Conseils-for-develop-a-grid-tp1299737p1471822.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

gerard alis


I think that there are always space to improve.
This is just that we should look at what we are doing in a different way.

>> It seems that you're using the stepping  mechanism, it is time consuming.

Yes stepping is not the way to go

What´s stepping? :)

 
>> also the layout managing and invalid areas redrawing.

do you redraw even the not visible cells?

I don´t know.  I have a ScrollPane widget. In that scrollPane i have a container (simply a panel morph). That pane have TableLayout policy, from top to bottom. Each row is added at that panel. Te rows is configured with TableLayout policy too, from left to right list direction, and in each row exists a collection of cells.

I suppose than the ScrollPane dont redraw controls out of limits, but I don´t know.

Seeing the trace seems than the more problematic is when creating the cells ( the method #buildCellsStructureFrom ).

Is possible stop all UI events when Iis running the build of cells and rows?
I did think in use threads, but the UI crushes when I try that way.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Hilaire Fernandes-4
In reply to this post by gerard alis
nullPointer a écrit :
> Then, there is not way of to improve much more that speed. I want use Pharo
> for commercial apps too, and surely need load lots of data.
>
>> It seems that you're using the stepping  mechanism, it is time consuming.
>> also the layout managing and invalid areas redrawing.
>
> Is possible fix that?

What about a late instantiation mechanism for invisible cell morph

Hilaire


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Stéphane Ducasse
In reply to this post by gerard alis
That a morph will perform an action every miliseconds.
Did you define the step method?
or stepTime?

Stef

On Feb 7, 2010, at 10:22 AM, nullPointer wrote:

>
>
> I think that there are always space to improve.
> This is just that we should look at what we are doing in a different way.
>
> >> It seems that you're using the stepping  mechanism, it is time consuming.
>
> Yes stepping is not the way to go
>
> What´s stepping? :)
>
>  
> >> also the layout managing and invalid areas redrawing.
>
> do you redraw even the not visible cells?
>
> I don´t know.  I have a ScrollPane widget. In that scrollPane i have a container (simply a panel morph). That pane have TableLayout policy, from top to bottom. Each row is added at that panel. Te rows is configured with TableLayout policy too, from left to right list direction, and in each row exists a collection of cells.
>
> I suppose than the ScrollPane dont redraw controls out of limits, but I don´t know.

With widgets from Squeak nothing is like we think they are :)
With the new tree widget developed by alain you get a lazy Tree morph with can handle large collection.


> Seeing the trace seems than the more problematic is when creating the cells ( the method #buildCellsStructureFrom ).
>
> Is possible stop all UI events when Iis running the build of cells and rows?
> I did think in use threads, but the UI crushes when I try that way.
>
> Regards
>
> View this message in context: Re: Conseils for develop a grid
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Stéphane Ducasse
In reply to this post by gerard alis
I'm very sorry that I'm good at widgets I would really like to help you.
This is for such a reason that we should continue to clean morphic to arrive to the point where
we do not have three different classes for doing the same and often not ahving the behavior we want.

Stef
On Feb 7, 2010, at 10:22 AM, nullPointer wrote:

>
>
> I think that there are always space to improve.
> This is just that we should look at what we are doing in a different way.
>
> >> It seems that you're using the stepping  mechanism, it is time consuming.
>
> Yes stepping is not the way to go
>
> What´s stepping? :)
>
>  
> >> also the layout managing and invalid areas redrawing.
>
> do you redraw even the not visible cells?
>
> I don´t know.  I have a ScrollPane widget. In that scrollPane i have a container (simply a panel morph). That pane have TableLayout policy, from top to bottom. Each row is added at that panel. Te rows is configured with TableLayout policy too, from left to right list direction, and in each row exists a collection of cells.
>
> I suppose than the ScrollPane dont redraw controls out of limits, but I don´t know.
>
> Seeing the trace seems than the more problematic is when creating the cells ( the method #buildCellsStructureFrom ).
>
> Is possible stop all UI events when Iis running the build of cells and rows?
> I did think in use threads, but the UI crushes when I try that way.
>
> Regards
>
> View this message in context: Re: Conseils for develop a grid
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Alain Plantec-4
In reply to this post by gerard alis
nullPointer a écrit :

>
>
>
>  
>
>     >> also the layout managing and invalid areas redrawing.
>
>     do you redraw even the not visible cells?
>
>
> I don´t know.  I have a ScrollPane widget. In that scrollPane i have a
> container (simply a panel morph). That pane have TableLayout policy,
> from top to bottom. Each row is added at that panel. Te rows is
> configured with TableLayout policy too, from left to right list
> direction, and in each row exists a collection of cells.
>
> I suppose than the ScrollPane dont redraw controls out of limits, but
> I don´t know.
yes, it works well like this

>
> ------------------------------------------------------------------------
> View this message in context: Re: Conseils for develop a grid
> <http://n4.nabble.com/Conseils-for-develop-a-grid-tp1299737p1471870.html>
> Sent from the Pharo Smalltalk mailing list archive
> <http://n4.nabble.com/Pharo-Smalltalk-f1294837.html> at Nabble.com.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Alain Plantec-4
In reply to this post by Hilaire Fernandes-4
Hilaire Fernandes a écrit :

> nullPointer a écrit :
>  
>> Then, there is not way of to improve much more that speed. I want use Pharo
>> for commercial apps too, and surely need load lots of data.
>>
>>    
>>> It seems that you're using the stepping  mechanism, it is time consuming.
>>> also the layout managing and invalid areas redrawing.
>>>      
>> Is possible fix that?
>>    
>
> What about a late instantiation mechanism for invisible cell morph
>  
I've  tried that (see LazyMorphTreeMorph). It seems to work well.
A list is opened in a second whatever the number of items.
the drawback (a serious one for very long list)  is the scrolling
because rows are recomputed when they become visible.
try it with
LazyClassListExample new openOn: Object
(for 1.0, get it from www.squeaksource.com/Momo10)
So maybe an example to start with ....

Cheers
Alain

> Hilaire
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>  


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Hilaire Fernandes-4
Alain Plantec a écrit :

> Hilaire Fernandes a écrit :
>> nullPointer a écrit :
>>  
>>> Then, there is not way of to improve much more that speed. I want use Pharo
>>> for commercial apps too, and surely need load lots of data.
>>>
>>>    
>>>> It seems that you're using the stepping  mechanism, it is time consuming.
>>>> also the layout managing and invalid areas redrawing.
>>>>      
>>> Is possible fix that?
>>>    
>> What about a late instantiation mechanism for invisible cell morph
>>  
> I've  tried that (see LazyMorphTreeMorph). It seems to work well.
> A list is opened in a second whatever the number of items.
> the drawback (a serious one for very long list)  is the scrolling
> because rows are recomputed when they become visible.
> try it with


Why not late initialization and caching. Thus rows are instantiated only
when they are first viewed.

Hilaire


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Conseils for develop a grid

Alain Plantec-4
Hilaire Fernandes a écrit :

> Alain Plantec a écrit :
>  
>> Hilaire Fernandes a écrit :
>>    
>>> nullPointer a écrit :
>>>  
>>>      
>>>> Then, there is not way of to improve much more that speed. I want use Pharo
>>>> for commercial apps too, and surely need load lots of data.
>>>>
>>>>    
>>>>        
>>>>> It seems that you're using the stepping  mechanism, it is time consuming.
>>>>> also the layout managing and invalid areas redrawing.
>>>>>      
>>>>>          
>>>> Is possible fix that?
>>>>    
>>>>        
>>> What about a late instantiation mechanism for invisible cell morph
>>>  
>>>      
>> I've  tried that (see LazyMorphTreeMorph). It seems to work well.
>> A list is opened in a second whatever the number of items.
>> the drawback (a serious one for very long list)  is the scrolling
>> because rows are recomputed when they become visible.
>> try it with
>>    
>
>
> Why not late initialization and caching. Thus rows are instantiated only
> when they are first viewed.
>  
I guess this is how LazyMorphTreeMorph works :)
Alain
> Hilaire
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>  


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
12