Re: [Pharo-users] Tabular Data Viewer
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 <stephan@stack.nl> 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 <sven@stfx.eu> 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
Guys, On 17 Jun 2013, at 16:55, Damien Cassou <damien.cassou@gmail.com> wrote:
On Mon, Jun 17, 2013 at 4:48 PM, Sven Van Caekenberghe <sven@stfx.eu> 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
On 17 Jun 2013, at 21:57, Sven Van Caekenberghe <sven@stfx.eu> wrote:
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 ?
#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
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 <sven@stfx.eu> wrote:
On 17 Jun 2013, at 21:57, Sven Van Caekenberghe <sven@stfx.eu> wrote:
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 ?
#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
-- www.tudorgirba.com "Every thing has its own flow"
participants (4)
-
Damien Cassou -
Stephan Eggermont -
Sven Van Caekenberghe -
Tudor Girba