Hi!
As you may know, in Pharo one can define an action using a #script pragma.
This is useful for example to have examples as in:
C class >> example01
<script>
…
This creates a small icon actionable next to the method name in the code browser. Clicking on it send the message #example01 to C.
You can you have another pragma #script: as in:
C>> example01
<script: ‘self new example01>
…
I have been using this kind of example because I want to have the examples available when I select a class. However, I see myself in using this pragma as a super easy way to have a button available in the code browser that execute something else than an example. For example, in one of my class, I have:
-=-=-=-=-=-=-=-=-=-=-=-=
SmallMultiple >> openMultiple
<script: 'SmallMultiple new openMultiple inspect'>
| b times c |
times := OrderedCollection new.
MCCVSImporter new
blockToExecute: [ :line | …
…
SmallMultiple >> menuCommandOn: aBuilder
<worldMenu>
(aBuilder item: #'Small Multiple')
label: 'Small Multiple';
icon: MatrixCubeIcons current cubeIcon;
action: [ self new openMultiple inspect ]
-=-=-=-=-=-=-=-=-=-=-=-=
The method #openMultiple open a file browser and let the user to select a file and do some treatment on a .csv file. As you can see, this is not an example, but really the starting point of the application.
All this long mail, to say that the code browser may not only be a place to look at code, execute tests, but also having user buttons to trigger and launch an application.
By the way, there has been some effort with examples from the GT team. How does this compare with the #script: pragma? How to use it?
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Copy artifact plugin in the jenkins wasn't correctly installed when we
recovered from the glitches in Inria infrastructure. I've installed the
plugin in the jenkins, however the jobs using the plugin prior to the
problem do not have this step any more in their configuration. We'll have
to add the step for red builds (i.e. copy required artefacts from the other
upstream jobs).
I've done it for a few but there are some jobs (GT-*) that I do not know
what to copy and from where so we need to go through the failing builds.
Tx Christophe, I'll check if everything's ok.
As Andrei said, we seem to have lost information regarding sending mails at
the end of the builds.
Did this problem occur in other projects?
Anyways, It is not a big deal and we can always add it we still need it.
On Tue, Jan 5, 2016 at 8:59 PM, Christophe Demarey <
Christophe.Demarey(a)inria.fr> wrote:
> done!
> could you check if all is ok?
>
> Le 5 janv. 2016 à 19:55, Christophe Demarey a écrit :
>
> > The info is not missed. You just have to restart Jenkins to have it back
> > _______________________________________________
> > Moose-dev mailing list
> > Moose-dev(a)list.inf.unibe.ch
> > https://www.list.inf.unibe.ch/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)list.inf.unibe.ch
> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
>
Hi,
I'm trying to understand the code behind the figure here to rotate labels:
So, I made a minimal example to start with, here (code is at
http://ws.stfx.eu/N6ZG4BAIBO00 )
Now I would like to rotate the text to made it look like the first
image. I presume that the code that made this possible for the first
case is this one:
====================
RTBundleBuilder>>createLabelFor: e view: aView
| lbl |
lbl := label elementOn: e model.
self interaction setUpElement: lbl.
aView add: lbl.
e addCallback: (TRTranslationCallback new block: [
| angle |
angle := (e position - center ) theta.
lbl translateTo: e position+((lbl trachelShape
notRotatedWidth/2) * (angle cos @ angle sin)).
angle := angle radiansToDegrees.
angle := angle + ((angle between: 90 and: 270) ifTrue: [ 180 ]
ifFalse: [ 0 ]).
lbl trachelShape angleInDegree: angle ] ).
e translateTo: e position.
====================
but I can not quite understand the lines
lbl translateTo: e position+((lbl trachelShape notRotatedWidth/2) *
(angle cos @ angle sin)).
and
angle := angle + ((angle between: 90 and: 270) ifTrue: [ 180 ] ifFalse:
[ 0 ]).
Could some body explain me how to incorporate rotation to the first
basic example at http://ws.stfx.eu/N6ZG4BAIBO00 (second image of this mail).
Thanks,
Offray
To all the moose community!
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.