Hi,
I looked at it a bit. It's a start, but I think the direction is not quite right yet.
Let's take a look at one of your examples:
builder := ROGridBuilder rows: 3 columns: 1.
builder at: 1 at: 1 putModel: #printString shape: shape1.
builder at: 2 at: 1 putModel: #instVarNames shape: shape2 innerShape: ROLabel layout: ROVerticalLineLayout new.
I like that you are using a matrix model.
But, what is not so clean is mixing shapes and elements. Right now, you are creating elements within the definition of the shape (i.e., #instVarNames).
A rule of thumb should be that shapes should be interchangeable. Consider the following Mondrian example:
| builder |
builder := MOFormsBuilder new.
builder column; pref; center;
row; fill;
row; fill.
builder x:1 y:1 add: (MORectangleShape new text: #asString; withoutBorder).
builder x:1 y:2 add: MOChildrenShape new.
view shape: builder asShape.
view node: 42 forIt: [
view nodes: (1 to: 42).
view gridLayout ]
In this case, I can keep the graph structure the same and simply use another shape, and it still works (In this case, the rectangle has a default way of handling children elements).
view node: 42 forIt: [
view nodes: (1 to: 42).
view gridLayout ]
I am not suggesting that FormsBuilder is the ultimate design. It's not. However, I still think it's good to keep a shape be a way of specifying how elements look, not how elements are composed.
The way we achieved this was through ChildrenShape, which simply offers a placeholder for where the children elements are rendered. The limitation of the previous design was that we only allowed one ChildrenShape. This is why we either showed methods or attributes in the uml class diagram.
But I think we could remedy the situation by having some sort of partitioning of the children. For example, we could tag children and then associate the tags to the different ChildrenShapes.
Ok, that is it for the moment.
Doru
> <roassal-complexshape-export-of-roshape.png>
On Apr 10, 2013, at 4:30 PM, Tudor Girba <tudor@tudorgirba.com> wrote:
> Thanks!
>
> Now, it will be easier to review :)
>
> Doru
>
>
> On Wed, Apr 10, 2013 at 4:27 PM, Juraj Kubelka <juraj.kubelka@gmail.com> wrote:
> Hi Doru,
>
> thank you for the navigation. There is the script:
>
> Gofer new
> smalltalkhubUser: 'JurajKubelka' project: 'RoassalProposals';
> package: 'Roassal';
> load.
>
> ROGridBuilderTest browse.
>
> Cheers,
> Jura
>
>
> 2013/4/10 Tudor Girba <tudor@tudorgirba.com>
> Hi Juraj,
>
> Great to see this starting.
>
> To make collaboration easier please do the following:
> - create a separate repository on SmalltalkHub
> - put your Roassal extensions there
> - send a Gofer script to load this code easily in a Moose image.
>
> (ask specific questions if you do not find out how to do it)
>
> In the meantime, I will try like it is now.
>
> Cheers,
> Doru
>
>
>
>
> On Wed, Apr 10, 2013 at 4:03 AM, Juraj Kubelka <juraj.kubelka@gmail.com> wrote:
> Hi all, Hi Doru!
>
> There is the kick-off of ComplexShape implementation in Roassal. If you file-in the attached code into https://ci.inria.fr/moose/job/moose-latest-dev-4.8/, you will be able to play with it a bit. There is ROGridBuilderTest test class with two examples.
>
> Doru, I suppose you are almost only one who manage Mondrian's complex shapes. Would you please examine the code and give me your opinion? Thank you a lot. … Of course any one can give me some feedback :-) I would appreciate it.
>
> For now I focused to do UML Class diagram. I know about blue-prints which can be done similar way. I have not seen other complex shapes. So there is an open space for other requirements which can impact interface and design.
>
> Implementation breaks several tests because of change in ROContainer>>encompassingNestedRectangle. I removed a default extent (5@5) which is not wanted. I will fix the tests later when the implementation will be accepted.
>
> Thank you for any response or question,
> Jura
>
>
>
>
>--
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
www.tudorgirba.com
"Every now and then stop and ask yourself if the war you're fighting is the right one."
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev