Thank you Alex, I will check all of that. Jannik 2014-10-28 13:23 GMT+01:00 Alexandre Bergel <[hidden email]>: There is a chapter on builders: ~~Jannik Laval~~ _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Ok, let us know!
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Alex, So I tried again but I have problems. Here is a sample code I made: === | view el shape| view := RTView new. [ el := RTElement forCollection: #(1 2 3). shape := RTMultiCompositeShape new add: (RTEllipse new color: Color blue; size: 20); add: (RTLabel new); horizontal; yourself. el do:[:e | e @ RTDraggable; + shape. ]. view elements do:[:e | view removeElement: e]. view addAll: el. RTGridLayout new on: el. view signalUpdate. ] valueWithInterval: 1second. view open === This code update the view every seconds, because the collection is changing regularly. Now, I tried to use a builder to make similar behavior but it has not the right behavior: the shapes are not well placed, and when I place the mouse on a shape, it raises an error. Here is the code: === | c b | c := RTComposer new. b := RTGraphBuilder new. b view: c view. [ b nodes color: Color blue. b layout circle. b cleanView. b addAll: #(1 2 3). b build ] valueWithInterval: 1second. c group. c layout: RTVerticalLineLayout new. c open. === So, what is your point of view ? What can I improve and how ? Is any guy of Roassal team coming at Smalltalks 2014 ? I will be at Cordoba and I would like to peer-program with someone who knows well Roassal. Jannik 2014-10-29 16:25 GMT+01:00 Alexandre Bergel <[hidden email]>:
~~Jannik Laval~~ _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Jannik,
You should never use valueWithInterval: This methods creates threads, and threads are evil. If you update Roassal, you will see I’ve added a new class for you, RTActiveAnimation. You can try this: -=-=-=-=-=-=-=-= v := RTView new. element := RTLabel elementOn: '0'. v add: element. value := 0. RTActiveAnimation new inView: v; blockToExecute: [ value := value + 1. element trachelShape text: value asString. ]. v -=-=-=-=-=-=-=-= Naturally, RTActiveAnimation may need to have some time delay. Does it make sense? Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Thank you Alex, I will try that !
I will need a time delay because my collection of nodes comes from an OSProcess call. Jannik 2014-10-29 19:38 GMT+01:00 Alexandre Bergel <[hidden email]>:
~~Jannik Laval~~ _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Ok. Give a try to modify RTActiveAnimation. This is rather easy to do.
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Alex, This is really cool to have that. I will use it for multiple cases. But in the case I have, I would refresh all the view, because I am not sure of the number of nodes I have (it is given by the OSProcess). It means that the line "v add: element" should be in the blockToExecute:, but it means that I need to remove other elements. Anther question: what is the method trachelShape ? Does it make sense to invoke trachel methods inside a Roassal script ? Thank you again. Jannik 2014-10-29 19:54 GMT+01:00 Alexandre Bergel <[hidden email]>:
~~Jannik Laval~~ _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Ok!
It should not be a problem at all I think.
#trachelShape returns a Trachel shape. I use it to modify some properties of the visual element (e.g., the displayed string in my example). If you are simply focusing on adding and removing elements, you do not need to care about trachel shape. Let us know! Cheers, Alexandre
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Ok, thank you Alex, I understand better how it works. Jannik 2014-10-30 14:51 GMT+01:00 Alexandre Bergel <[hidden email]>:
~~Jannik Laval~~ _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Ok, let me know how it goes. Alexandre
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |