Hi,
Is there an easy way to view tabular data in Pharo, much like a spreadsheet ? Ideally, something along the following lines MagicTableView new headings: #( name age sex score ); data: <some collection>; open. Can spec be used for this ? Pointing me to some relevant example in the image is OK too ;-) Thx, Sven -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill |
Glamour has a simple table viewer. From
GLMBasicExamples open simpleTable <glmBrowser: 'Simple table' input: '100'> "| f | f := self new simpleTable. f openOn: 1000. (f panes first port: #selection) value: 1" | finder | finder := GLMFinder new. finder show: [:a | a table display: [ :x | 1 to: x ]; dynamicActions: [ :list | self actionsFor: list ]; column: [:x | 'Numbers from 1 to ', x asString] evaluated: #asString; column: 'Even' evaluated: [ :each | each even asString ]; column: 'Odd' evaluated: [ :each | each odd asString ] ]. ^ finder |
Thanks Stephan, I will have a look using a Moose image later this evening.
I guess Glamour can be loaded in Pharo 2.0 ? On 17 Jun 2013, at 16:40, Stephan Eggermont <[hidden email]> wrote: > Glamour has a simple table viewer. From > GLMBasicExamples open > > simpleTable > <glmBrowser: 'Simple table' input: '100'> > "| f | > f := self new simpleTable. > f openOn: 1000. > (f panes first port: #selection) value: 1" > | finder | > finder := GLMFinder new. > finder show: [:a | > a table > display: [ :x | 1 to: x ]; > dynamicActions: [ :list | self actionsFor: list ]; > column: [:x | 'Numbers from 1 to ', x asString] evaluated: #asString; > column: 'Even' evaluated: [ :each | each even asString ]; > column: 'Odd' evaluated: [ :each | each odd asString ] ]. > ^ finder > |
On Mon, Jun 17, 2013 at 4:48 PM, Sven Van Caekenberghe <[hidden email]> wrote:
> Thanks Stephan, I will have a look using a Moose image later this evening. > I guess Glamour can be loaded in Pharo 2.0 ? yes it can. http://www.smalltalkhub.com/#!/~Moose/Glamour -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill |
In reply to this post by Sven Van Caekenberghe-2
Hi Sven,
This kind of widget is missing. Have a try with: SimpleGridExample new open It is implemented with MorphTreeMorph. It is far from the best solution since MorphTreeMorph a Tree/List widget but it should be ok if you have not too many data. Maybe the Glamour solution is based on it, I don't remember. Cheers Alain On 17 juin 2013, at 16:17, Sven Van Caekenberghe <[hidden email]> wrote: > Hi, > > Is there an easy way to view tabular data in Pharo, much like a spreadsheet ? > > Ideally, something along the following lines > > MagicTableView new > headings: #( name age sex score ); > data: <some collection>; > open. > > Can spec be used for this ? > > Pointing me to some relevant example in the image is OK too ;-) > > Thx, > > Sven > > > -- > Sven Van Caekenberghe > http://stfx.eu > Smalltalk is the Red Pill > > |
In reply to this post by Damien Cassou
Guys,
On 17 Jun 2013, at 16:55, Damien Cassou <[hidden email]> wrote: > On Mon, Jun 17, 2013 at 4:48 PM, Sven Van Caekenberghe <[hidden email]> wrote: >> Thanks Stephan, I will have a look using a Moose image later this evening. >> I guess Glamour can be loaded in Pharo 2.0 ? > > yes it can. http://www.smalltalkhub.com/#!/~Moose/Glamour > > -- > Damien Cassou > http://damiencassou.seasidehosting.st This is seriously cool ! I did a curl get.moostechnology.org/Glamour25 | bash And in that image I first did | data | data := (1 to: 100) collect: [ :each | { #number->each. #double->(each*each). #reciprocal->each reciprocal asFloat. #words->each asWords} asDictionary ]. GLMWrapper new show: [ :a | a table display: [ :x | x ]; column: 'Number' evaluated: [ :x | (x at: #number) asString ]; column: 'Double' evaluated: [ :x | (x at: #double) asString ]; column: 'Reciprocal' evaluated: [ :x | (x at: #reciprocal) asString ]; column: 'Words' evaluated: [ :x | x at: #words ] ]; openOn: data. Which did what I wanted, but then I improved it to | data fields | data := (1 to: 100) collect: [ :each | { #number->each. #double->(each*each). #reciprocal->each reciprocal asFloat. #words->each asWords} asDictionary ]. fields := #(number double reciprocal words). GLMWrapper new show: [ :a | | table | (table := a table) display: [ :x | x ]. fields do: [ :field | table column: field capitalized asString evaluated: [ :x | (x at: field) asString ] ] ]; openOn: data. Which is totally what I wanted ;-) What part/group of Glamour do I have to load to get this in another image with minimal fuss or deps ? #bleedingEdge 'Core' & 'Morphic' maybe ? Thx, Sven -- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org |
In reply to this post by Alain Plantec-3
Hey Alain,
Thanks for the pointer, that example works OK, though I don't need the editing, but I guess that could be done as well. It is good to know that this is standard. But for now I am going to try using Glamour. Sven On 17 Jun 2013, at 19:29, plantec <[hidden email]> wrote: > Hi Sven, > This kind of widget is missing. > Have a try with: > SimpleGridExample new open > It is implemented with MorphTreeMorph. > It is far from the best solution since MorphTreeMorph a Tree/List > widget but it should be ok if you have not too many data. > Maybe the Glamour solution is based on it, I don't remember. > Cheers > Alain > > > On 17 juin 2013, at 16:17, Sven Van Caekenberghe <[hidden email]> wrote: > >> Hi, >> >> Is there an easy way to view tabular data in Pharo, much like a spreadsheet ? >> >> Ideally, something along the following lines >> >> MagicTableView new >> headings: #( name age sex score ); >> data: <some collection>; >> open. >> >> Can spec be used for this ? >> >> Pointing me to some relevant example in the image is OK too ;-) >> >> Thx, >> >> Sven >> >> >> -- >> Sven Van Caekenberghe >> http://stfx.eu >> Smalltalk is the Red Pill >> >> > > > > > |
In reply to this post by Sven Van Caekenberghe-2
On 17 Jun 2013, at 21:57, Sven Van Caekenberghe <[hidden email]> wrote: What part/group of Glamour do I have to load to get this in another image with minimal fuss or deps ? #development with 'Core' & 'Morphic' did the trick, and now I have my table viewer to help me during development and debugging: Thank you, Glamour. Sven -- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org |
In reply to this post by Alain Plantec-3
On 17 June 2013 19:29, plantec <[hidden email]> wrote:
> Hi Sven, > This kind of widget is missing. > Have a try with: > SimpleGridExample new open > It is implemented with MorphTreeMorph. > It is far from the best solution since MorphTreeMorph a Tree/List > widget but it should be ok if you have not too many data. > Maybe the Glamour solution is based on it, I don't remember. Speaking about MorphTreeMorph: i find it really strange that it supports grid layouts. When one entity has so many responsibilities/functionality, it is easy to get lost there. As a consequence: if there's a bug, it is really hard to fix it. > Cheers > Alain > > > On 17 juin 2013, at 16:17, Sven Van Caekenberghe <[hidden email]> wrote: > >> Hi, >> >> Is there an easy way to view tabular data in Pharo, much like a spreadsheet ? >> >> Ideally, something along the following lines >> >> MagicTableView new >> headings: #( name age sex score ); >> data: <some collection>; >> open. >> >> Can spec be used for this ? >> >> Pointing me to some relevant example in the image is OK too ;-) >> >> Thx, >> >> Sven >> >> >> -- >> Sven Van Caekenberghe >> http://stfx.eu >> Smalltalk is the Red Pill >> >> > > > > > -- Best regards, Igor Stasenko. |
>
>> Hi Sven, >> This kind of widget is missing. >> Have a try with: >> SimpleGridExample new open >> It is implemented with MorphTreeMorph. >> It is far from the best solution since MorphTreeMorph a Tree/List >> widget but it should be ok if you have not too many data. >> Maybe the Glamour solution is based on it, I don't remember. > > Speaking about MorphTreeMorph: i find it really strange that it > supports grid layouts. > When one entity has so many responsibilities/functionality, it is easy > to get lost there. > As a consequence: if there's a bug, it is really hard to fix it. I agree and I would prefer to have a gridMorph Stef |
In reply to this post by Sven Van Caekenberghe-2
Glamour uses a PaginatedMorphTreeMorph for the table view.
A real gridMorph (with support for unlimited rows/columns) would definitely be nice. Stephan |
In reply to this post by Igor Stasenko
On 18 juin 2013, at 13:47, Igor Stasenko <[hidden email]> wrote: > On 17 June 2013 19:29, plantec <[hidden email]> wrote: >> Hi Sven, >> This kind of widget is missing. >> Have a try with: >> SimpleGridExample new open >> It is implemented with MorphTreeMorph. >> It is far from the best solution since MorphTreeMorph a Tree/List >> widget but it should be ok if you have not too many data. >> Maybe the Glamour solution is based on it, I don't remember. > > Speaking about MorphTreeMorph: i find it really strange that it > supports grid layouts. it's not strange, it can do it out of the box because of the column management. So I think this feature do not add any complexity. But I agree, MorphTreeMorph is toooo complex. > When one entity has so many responsibilities/functionality, it is easy > to get lost there. > As a consequence: if there's a bug, it is really hard to fix it. yes, :) I know, MorphTreeMorph is a kind of hack and it should be remade as soon as possible. cheers Alain > > >> Cheers >> Alain >> >> >> On 17 juin 2013, at 16:17, Sven Van Caekenberghe <[hidden email]> wrote: >> >>> Hi, >>> >>> Is there an easy way to view tabular data in Pharo, much like a spreadsheet ? >>> >>> Ideally, something along the following lines >>> >>> MagicTableView new >>> headings: #( name age sex score ); >>> data: <some collection>; >>> open. >>> >>> Can spec be used for this ? >>> >>> Pointing me to some relevant example in the image is OK too ;-) >>> >>> Thx, >>> >>> Sven >>> >>> >>> -- >>> Sven Van Caekenberghe >>> http://stfx.eu >>> Smalltalk is the Red Pill >>> >>> >> >> >> >> >> > > > > -- > Best regards, > Igor Stasenko. > |
Hi Alain,
I agree that MorphTreeMorph is too complex. But, at the same time, it's pretty effective :) Thierry ________________________________________ De : Pharo-users [[hidden email]] de la part de plantec [[hidden email]] Date d'envoi : mardi 18 juin 2013 21:57 À : Any question about pharo is welcome Objet : Re: [Pharo-users] Tabular Data Viewer On 18 juin 2013, at 13:47, Igor Stasenko <[hidden email]> wrote: > On 17 June 2013 19:29, plantec <[hidden email]> wrote: >> Hi Sven, >> This kind of widget is missing. >> Have a try with: >> SimpleGridExample new open >> It is implemented with MorphTreeMorph. >> It is far from the best solution since MorphTreeMorph a Tree/List >> widget but it should be ok if you have not too many data. >> Maybe the Glamour solution is based on it, I don't remember. > > Speaking about MorphTreeMorph: i find it really strange that it > supports grid layouts. it's not strange, it can do it out of the box because of the column management. So I think this feature do not add any complexity. But I agree, MorphTreeMorph is toooo complex. > When one entity has so many responsibilities/functionality, it is easy > to get lost there. > As a consequence: if there's a bug, it is really hard to fix it. yes, :) I know, MorphTreeMorph is a kind of hack and it should be remade as soon as possible. cheers Alain > > >> Cheers >> Alain >> >> >> On 17 juin 2013, at 16:17, Sven Van Caekenberghe <[hidden email]> wrote: >> >>> Hi, >>> >>> Is there an easy way to view tabular data in Pharo, much like a spreadsheet ? >>> >>> Ideally, something along the following lines >>> >>> MagicTableView new >>> headings: #( name age sex score ); >>> data: <some collection>; >>> open. >>> >>> Can spec be used for this ? >>> >>> Pointing me to some relevant example in the image is OK too ;-) >>> >>> Thx, >>> >>> Sven >>> >>> >>> -- >>> Sven Van Caekenberghe >>> http://stfx.eu >>> Smalltalk is the Red Pill >>> >>> >> >> >> >> >> > > > > -- > Best regards, > Igor Stasenko. > |
In reply to this post by Sven Van Caekenberghe-2
http://stackoverflow.com/questions/4674116/are-there-any-open-source-spreadsheet-implementations-in-smalltalk-which-are-use
El 17/06/2013 11:17, Sven Van Caekenberghe escribió: > Hi, > > Is there an easy way to view tabular data in Pharo, much like a spreadsheet ? > > Ideally, something along the following lines > > MagicTableView new > headings: #( name age sex score ); > data: <some collection>; > open. > > Can spec be used for this ? > > Pointing me to some relevant example in the image is OK too ;-) > > Thx, > > Sven > > > -- > Sven Van Caekenberghe > http://stfx.eu > Smalltalk is the Red Pill > > > . > |
On 19 Jun 2013, at 02:26, Hernán Morales Durand <[hidden email]> wrote: > http://stackoverflow.com/questions/4674116/are-there-any-open-source-spreadsheet-implementations-in-smalltalk-which-are-use Thanks Hernán, that looks quite good as well - but I am good for now. > El 17/06/2013 11:17, Sven Van Caekenberghe escribió: >> Hi, >> >> Is there an easy way to view tabular data in Pharo, much like a spreadsheet ? >> >> Ideally, something along the following lines >> >> MagicTableView new >> headings: #( name age sex score ); >> data: <some collection>; >> open. >> >> Can spec be used for this ? >> >> Pointing me to some relevant example in the image is OK too ;-) >> >> Thx, >> >> Sven >> >> >> -- >> Sven Van Caekenberghe >> http://stfx.eu >> Smalltalk is the Red Pill >> >> >> . >> > > |
In reply to this post by Sven Van Caekenberghe-2
Hi Sven, I am happy you like Glamour :). Sorry for my late reply, but I am still on holidays (but still having a hard time staying away from the mailing lists :)). Indeed, this is what you needed to load.
Cheers, Doru On Tue, Jun 18, 2013 at 1:27 PM, Sven Van Caekenberghe <[hidden email]> wrote:
"Every thing has its own flow"
|
Free forum by Nabble | Edit this page |