Hello,
Is there a way to set a default selection to a list presentation? so that
when I open the browser, the morphic list has already a value selected.
I tried that:
|tmpBrowser|
tmpBrowser := GLMTabulator new.
tmpBrowser row: #list.
tmpBrowser transmit to: #list; andShow: [:a |
a list
display: [:input | input];
selection: #a;
yourself
].
tmpBrowser openOn: #( b c d v a d f r).
but the list still open with nothing selected
Hi,
Alex Syrel, Andrei Chis and I are happy to announce a new addition to the
Glamorous Toolkit:
GTSpotter, a novel interface for spotting objects.
GTSpotter has two goals:
- Provide a uniform yet moldable interface that can work on any object, and
- Handle searching through arbitrary levels of object nesting.
We think this will have a significant impact on the development workflow in
Pharo.
Here is a couple of screenshots:
[image: Inline image 2] [image: Inline image 1] [image: Inline …
[View More]image 3]
A trailer is available here:
https://www.youtube.com/watch?v=PhSmjR3NOlU
A detailed description is available here:
http://www.humane-assessment.com/blog/introducing-gtspotter
It works already in Pharo 3.0 and can be played with by following the
instructions from:
http://gt.moosetechnology.org
Please let us know what you think.
Enjoy,
The Glamorous Team
[View Less]
Hi,
since I wanted to use DarkTheme I played around with TRMorph (since seeing
giant white rectangle in dark theme is not very nice).
What I have done is moved the background color setting to `surface clear:`
(instead of the original aCanvas fillRectangle).
And then if theme background luminance is dark (>0.5), I invert all the
colors in the visualization.
For dark theme the background is black, and not the theme background - at
least to me it seems that black is much clearer.
Is this …
[View More]something that could be incorporated?
And the modified code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"protocol: drawing"
TRMorph>>drawOn: aCanvas
"aCanvas is a FormCanvas"
self checkSession.
"aCanvas fillRectangle: bounds color: trachelCanvas color."
trachelCanvas playAnimations.
"The drawing has to be done when a change in the shapes occured or when
there is an animation."
surface drawDuring: [:cs |
surface clear: trachelCanvas color.
"We display the elements that are subject to the camera"
cs pathTransform
translateBy: (self extent / 2) asFloatPoint;
scaleBy: trachelCanvas camera scale asFloat;
translateBy: trachelCanvas camera position negated asFloatPoint.
trachelCanvas shapes do: [ :trachelShape |
trachelShape drawOn: cs.
].
"We display the elements that are _NOT_ subject to the camera"
cs pathTransform loadIdentity scaleBy: 1.001.
trachelCanvas fixedShapes do: [ :trachelShape |
trachelShape drawOn: cs.
].
].
self theme backgroundColor luminance < 0.5 ifTrue: [
surface drawDuring: [ :cs |
cs paintMode restoreAfter: [
cs setPaint: Color white.
cs paintMode difference.
cs drawShape: (0 @ 0 extent: surface extent)
]
]
].
"aCanvas translucentImage: surface asForm at: self bounds origin."
"asForm creates a new Form, which is likely to be expensive. This can be
cached"
aCanvas image: surface asForm at: self bounds origin sourceRect: (0 @ 0
extent: surface extent) rule: 34.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[View Less]
Hi,
apparently we broke MorphicRoassalAdapter when cleaning Spec, I attached a
fix.
However my question is - does anybody (except us) actually use the
Roassal2Spec package? Because otherwise we could clean it a bit. For
example I'm not sure of the use case of script:/lastEvent:.
Peter
Hi everyone,
some time ago I saw a diagram consisting of two columns of words and lines
showing associations between the words in both columns.
It looked similar to the "parallel coordinates" diagram from this link:
http://homes.cs.washington.edu/~jheer/files/zoo/ but with only two columns.
Now, I am not sure if I saw this in an email on a Pharo or Moose list and
wanted to ask if it is already possible to create such diagrams with
Roassal.
Thank you very much,
Manfred
Hi everyone,
I guess because of a rapid evolution some parts of Roassal are weird. For example RTAbstractLine>>#updateFor:trachelShape: implements the shape drawing, so theoretically RTLine has to only override #trachelShapeClass to return TRLine. Instead RTLine overrides #trachelShapeFor: and does it incorrectly, because width cannot be used as a block but only as a number.
We have to handle this somehow, because 1) RTLine works incorrectly. 2) RTLine ignores the implementation …
[View More]strategy coded into RTAbstractLine.
Uko
[View Less]
Hi!
I relaxed a bit by implementing something that was missing in Grapher.
Consider the following code:
-=-=-=-=-=-=-=-=-=-=-=-=
b := RTGrapher new.
ds := RTDataSet new.
ds points: #(5 10 6 2 -2.5).
b add: ds.
“below is the magic line"
b addDecorator: RTCursorFollower new.
b
-=-=-=-=-=-=-=-=-=-=-=-=
This “magic line” add two bar that follows the mouse cursor. Here is a screenshot:
Here is on a larger example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| methods trachelMethods b ds |
…
[View More]methods := Collection withAllSubclasses flatCollect: #rtmethods.
trachelMethods := TRObject withAllSubclasses flatCollect: #rtmethods.
b := RTGrapher new.
b extent: 200 @ 200.
"Data set 1"
ds := RTDataSet new.
ds interaction popup.
ds dotShape circle color: (Color red alpha: 0.3).
ds points: methods.
ds x: #numberOfLinesOfCode.
ds y: [ :m | m getSource size ].
b add: ds.
"Data set 2"
ds := RTDataSet new.
ds interaction popup.
ds dotShape circle color: (Color blue alpha: 0.3).
ds points: trachelMethods.
ds x: #numberOfLinesOfCode.
ds y: [ :m | m getSource size ].
b add: ds.
b axisX withThousandsSeparator; title: 'LOC'.
b axisY noDecimal; title: 'Size'.
b addDecorator: RTCursorFollower new.
b build.
^ b view
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Maybe this cursor follower should be per default in all produced chart. Any opinion?
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
[View Less]
Hi Hannes!
Here is a first shoot paired-programmed with Juraj using Roassal:
-=-=-=-=-=-=-=-=-=-=-=-=
b := RTTimeLine new.
b addEntry: (RTTimeLineEntry new identifier: #WP1; start: 0; end: 5).
b addEntry: (RTTimeLineEntry new identifier: #WP2; start: 5; end: 8).
b addEntry: (RTTimeLineEntry new identifier: #WP3; start: 7; end: 10).
b axisX numberOfLabels: 5.
b
-=-=-=-=-=-=-=-=-=-=-=-=
Here some slightly more elaborated example:
-=-=-=-=-=-=-=-=-=-=-=-=
“One color per entry"
| b d |
b …
[View More]:= RTTimeLine new.
b addEntry: (RTTimeLineEntry new identifier: #c1; start: 0; end: 5).
b addEntry: (RTTimeLineEntry new identifier: #c1; start: 6; end: 8).
b addEntry: (RTTimeLineEntry new identifier: #c2; start: 0; end: 5).
b addEntry: (RTTimeLineEntry new identifier: #c2; start: 8; end: 10).
b addEntry: (RTTimeLineEntry new identifier: #c3; start: 0; end: 10).
b addEntry: (RTTimeLineEntry new identifier: #c4; start: 5; end: 10).
b addEntry: (RTTimeLineEntry new identifier: #c5; start: 5; end: 8).
d := RTVerticalTickLineDecorator new.
d shape line color: Color white.
b addDecorator: d.
b axisX
numberOfLabels: 5;
labelRotation: -45;
labelConversion: [ :v | Date year: 2015 day: v ].
b shape color: (RTMultiLinearColorForIdentity new objects: b entries).
b
-=-=-=-=-=-=-=-=-=-=-=-=
One color per timeline
-=-=-=-=-=-=-=-=-=-=-=-=
| b |
b := RTTimeLine new.
b addEntry: (RTTimeLineEntry new identifier: #c1; start: 0; end: 5).
b addEntry: (RTTimeLineEntry new identifier: #c1; start: 6; end: 8).
b addEntry: (RTTimeLineEntry new identifier: #c2; start: 0; end: 5).
b addEntry: (RTTimeLineEntry new identifier: #c2; start: 8; end: 10).
b addEntry: (RTTimeLineEntry new identifier: #c3; start: 0; end: 10).
b addEntry: (RTTimeLineEntry new identifier: #c4; start: 5; end: 10).
b addEntry: (RTTimeLineEntry new identifier: #c5; start: 5; end: 8).
d := RTVerticalTickLineDecorator new.
d shape line color: Color white.
b addDecorator: d.
b axisX
numberOfLabels: 5;
labelRotation: -45;
labelConversion: [ :v | Date year: 2015 day: v ].
b shape color: (RTMultiLinearColorForIdentity new command: #identifier; objects: #(c1 c2 c3 c4 c5)).
b
-=-=-=-=-=-=-=-=-=-=-=-=
Age of some classes:
-=-=-=-=-=-=-=-=-=-=-=-=
| b |
b := RTTimeLine new.
b extent: 500 @ 500.
((RTShape withAllSubclasses sortedAs: #ageInDaysRounded) select: #hasMethods)
do: [ :cls |
e := RTTimeLineEntry new.
e identifier: cls.
e start: cls computeYoungestMethod ageInDays.
e end: cls computeOldestMethod ageInDays.
b addEntry: e ].
b
-=-=-=-=-=-=-=-=-=-=-=-=
All these examples are in the Roassal time line example menu.
This is still an early version. Let us know how it goes!
https://www.facebook.com/ObjectProfile/posts/840542572699008
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> On May 7, 2015, at 4:25 PM, H. Hirzel <hannes.hirzel(a)gmail.com> wrote:
>
> Hello
>
> Has somebody done a GANTT chart?
>
> GanttChartMorph openOn: aCollectionOfActivities
>
> ?
>
> Activities have
> - id
> - description
> - start date
> - end date
> ?
>
> Regards
>
> Hannes
>
[View Less]
Anybody can explain the changes that occured over DeepTraverser ?
(Ideally how can we switch from old to new traverser?)
We have an "old" (1 year) bit of code that use the deepCollect: method
However, the changes in DeepTraverser break our code :-(
DeepTraverser-StefanReichhart.9
Time: 11 May 2015, 7:02:16.666278 pm
nicolas