|
Re: Displaying rows of data, PluggableMultiColumnListMorph: msg#00048lang.smalltalk.squeak.beginners
On Fri, Oct 12, 2007 at 06:56:55PM +0200, Peter Schneider wrote: > Hello, > > i want to display the results of an ongoing calculation. I'm not terribly > concerned about speed, as this is just for educational purposes. > So i figured that PluggableMultiColumnListMorph would be a good place to > start. > My problem now is, that it only wants to take Arrays as its source list. > Because i don't know how many rows of data need to be displayed, i just > threw all of them in an OrderedCollection. > If i convert this OrderedCollection with "asArray" and feed it to the > MultiColoumnMorph the contents are displayed just fine, but i can't select > any entries or navigate using the arrow keys. > In fact, i can only select as much entries as there are columns in the > Morph. > > To illustrate, i did something roughly similiar to the following: > > |column1 column2| > result := OrderedCollection new. > column1 := OrderedCollection new. > column2 := OrderedCollection new. > column1 add: 'x-component'; add: 'purz'; add: 'durst'; add: 'puh'. > column2 add: 'y-component'; add: 'purz1'; add: 'durst1'; add: 'puh1'. > result add: (column1 asArray); add: (column2 asArray). > result := result asArray. I don't understand how this hooks up to PluggableMultiColumnListMorph. Is this the getListSelector code? Looking at the class comment, it says getListSelector should return an OrderedCollection of Arrays, where each Array is a row. You seem to be doing something in column-major order, so I don't really see how this code is supposed to work -- Matthew Fulmer -- http://mtfulmer.wordpress.com/ Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: how do I get Seaside up on my Squeak?, Matthias Berth |
|---|---|
| Next by Date: | Re: Displaying rows of data, PluggableMultiColumnListMorph, Peter Schneider |
| Previous by Thread: | Displaying rows of data, PluggableMultiColumnListMorph, Peter Schneider |
| Next by Thread: | Re: Displaying rows of data, PluggableMultiColumnListMorph, Peter Schneider |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |