Hi Alex,
I would need your help in introducing the ChildrenShape. Without this, the FormsBuilder is highly underutilized. The problem I have is that currently the drawing of the nested graphs is handled on the Figure side, while it should be handled by the Shape. So, I would need your help to move this behavior while still preserving the caching logic. The ChildrenShape should then override the display:on: to display these elements. Would you have time to look into this? For example, the following code should define a umlClassShape: | builder childrenShape titleShape umlClassShape | childrenShape := MOChildrenShape new. titleShape := MORectangleShape new text: 'Title'; fillColor: Color transparent. builder := MOFormsBuilder new. builder column; center; fill; pref; grow. builder row; center; pref; fill; grow; row; center; fill; pref; grow. builder x: 1 y: 1 add: titleShape. builder x: 1 y: 2 add: childrenShape. umlClassShape := builder asShape. view nodeShape: umlClassShape. view nodes: (1 to: 3) forEach: [:each | view nodes: (1 to: 10) ] Cheers, Doru -- www.tudorgirba.com "Not knowing how to do something is not an argument for how it cannot be done." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Doru,
Yes, I will have a look at this today. Alexandre On 9 Aug 2010, at 08:22, Tudor Girba wrote: > Hi Alex, > > I would need your help in introducing the ChildrenShape. Without this, the FormsBuilder is highly underutilized. > > The problem I have is that currently the drawing of the nested graphs is handled on the Figure side, while it should be handled by the Shape. So, I would need your help to move this behavior while still preserving the caching logic. > > The ChildrenShape should then override the display:on: to display these elements. > > Would you have time to look into this? > > > > For example, the following code should define a umlClassShape: > > | builder childrenShape titleShape umlClassShape | > > childrenShape := MOChildrenShape new. > titleShape := MORectangleShape new text: 'Title'; fillColor: Color transparent. > builder := MOFormsBuilder new. > builder column; center; fill; pref; grow. > builder row; center; pref; fill; grow; row; center; fill; pref; grow. > builder x: 1 y: 1 add: titleShape. > builder x: 1 y: 2 add: childrenShape. > umlClassShape := builder asShape. > > view nodeShape: umlClassShape. > view nodes: (1 to: 3) forEach: [:each | > view nodes: (1 to: 10) ] > > > Cheers, > Doru > > -- > www.tudorgirba.com > > "Not knowing how to do something is not an argument for how it cannot be done." > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Tudor Girba-2
Hi!
I may have fixed up the thing. Could you try: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | builder childrenShape titleShape umlClassShape | childrenShape := MOChildrenShape new. titleShape := MORectangleShape new text: 'Title'. builder := MOFormsBuilder new. builder column; center; fill; pref; grow. builder row; center; pref; fill; grow; row; center; fill; pref; grow. builder x: 1 y: 1 add: titleShape. builder x: 1 y: 2 add: childrenShape. umlClassShape := builder asShape. view nodeShape: umlClassShape. view nodes: (1 to: 3) forEach: [:each | view nodes: (1 to: 10) ] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= This is the same code, except that I removed the transparent color. Cheers, Alexandre On 9 Aug 2010, at 08:22, Tudor Girba wrote: > Hi Alex, > > I would need your help in introducing the ChildrenShape. Without this, the FormsBuilder is highly underutilized. > > The problem I have is that currently the drawing of the nested graphs is handled on the Figure side, while it should be handled by the Shape. So, I would need your help to move this behavior while still preserving the caching logic. > > The ChildrenShape should then override the display:on: to display these elements. > > Would you have time to look into this? > > > > For example, the following code should define a umlClassShape: > > | builder childrenShape titleShape umlClassShape | > > childrenShape := MOChildrenShape new. > titleShape := MORectangleShape new text: 'Title'; fillColor: Color transparent. > builder := MOFormsBuilder new. > builder column; center; fill; pref; grow. > builder row; center; pref; fill; grow; row; center; fill; pref; grow. > builder x: 1 y: 1 add: titleShape. > builder x: 1 y: 2 add: childrenShape. > umlClassShape := builder asShape. > > view nodeShape: umlClassShape. > view nodes: (1 to: 3) forEach: [:each | > view nodes: (1 to: 10) ] > > > Cheers, > Doru > > -- > www.tudorgirba.com > > "Not knowing how to do something is not an argument for how it cannot be done." > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi,
Indeed, it starts to look good :). Now, the problem is that the two shapes are drawn on top of each other. We need to translate the canvas when drawing the children shape. Cheers, Doru On 10 Aug 2010, at 02:23, Alexandre Bergel wrote: > Hi! > > I may have fixed up the thing. > > Could you try: > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > | builder childrenShape titleShape umlClassShape | > > childrenShape := MOChildrenShape new. > titleShape := MORectangleShape new text: 'Title'. > builder := MOFormsBuilder new. > builder column; center; fill; pref; grow. > builder row; center; pref; fill; grow; row; center; fill; pref; grow. > builder x: 1 y: 1 add: titleShape. > builder x: 1 y: 2 add: childrenShape. > umlClassShape := builder asShape. > > view nodeShape: umlClassShape. > view nodes: (1 to: 3) forEach: [:each | > view nodes: (1 to: 10) ] > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > This is the same code, except that I removed the transparent color. > > Cheers, > Alexandre > > On 9 Aug 2010, at 08:22, Tudor Girba wrote: > >> Hi Alex, >> >> I would need your help in introducing the ChildrenShape. Without >> this, the FormsBuilder is highly underutilized. >> >> The problem I have is that currently the drawing of the nested >> graphs is handled on the Figure side, while it should be handled by >> the Shape. So, I would need your help to move this behavior while >> still preserving the caching logic. >> >> The ChildrenShape should then override the display:on: to display >> these elements. >> >> Would you have time to look into this? >> >> >> >> For example, the following code should define a umlClassShape: >> >> | builder childrenShape titleShape umlClassShape | >> >> childrenShape := MOChildrenShape new. >> titleShape := MORectangleShape new text: 'Title'; fillColor: Color >> transparent. >> builder := MOFormsBuilder new. >> builder column; center; fill; pref; grow. >> builder row; center; pref; fill; grow; row; center; fill; pref; grow. >> builder x: 1 y: 1 add: titleShape. >> builder x: 1 y: 2 add: childrenShape. >> umlClassShape := builder asShape. >> >> view nodeShape: umlClassShape. >> view nodes: (1 to: 3) forEach: [:each | >> view nodes: (1 to: 10) ] >> >> >> Cheers, >> Doru >> >> -- >> www.tudorgirba.com >> >> "Not knowing how to do something is not an argument for how it >> cannot be done." >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "We cannot reach the flow of things unless we let go." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Doru,
Can a form shape be manually created, not from a builder? I guess no. Cheers, Alexandre On 10 Aug 2010, at 01:04, Tudor Girba wrote: > Hi, > > Indeed, it starts to look good :). > > Now, the problem is that the two shapes are drawn on top of each other. > > We need to translate the canvas when drawing the children shape. > > Cheers, > Doru > > > On 10 Aug 2010, at 02:23, Alexandre Bergel wrote: > >> Hi! >> >> I may have fixed up the thing. >> >> Could you try: >> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >> | builder childrenShape titleShape umlClassShape | >> >> childrenShape := MOChildrenShape new. >> titleShape := MORectangleShape new text: 'Title'. >> builder := MOFormsBuilder new. >> builder column; center; fill; pref; grow. >> builder row; center; pref; fill; grow; row; center; fill; pref; grow. >> builder x: 1 y: 1 add: titleShape. >> builder x: 1 y: 2 add: childrenShape. >> umlClassShape := builder asShape. >> >> view nodeShape: umlClassShape. >> view nodes: (1 to: 3) forEach: [:each | >> view nodes: (1 to: 10) ] >> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >> >> This is the same code, except that I removed the transparent color. >> >> Cheers, >> Alexandre >> >> On 9 Aug 2010, at 08:22, Tudor Girba wrote: >> >>> Hi Alex, >>> >>> I would need your help in introducing the ChildrenShape. Without this, the FormsBuilder is highly underutilized. >>> >>> The problem I have is that currently the drawing of the nested graphs is handled on the Figure side, while it should be handled by the Shape. So, I would need your help to move this behavior while still preserving the caching logic. >>> >>> The ChildrenShape should then override the display:on: to display these elements. >>> >>> Would you have time to look into this? >>> >>> >>> >>> For example, the following code should define a umlClassShape: >>> >>> | builder childrenShape titleShape umlClassShape | >>> >>> childrenShape := MOChildrenShape new. >>> titleShape := MORectangleShape new text: 'Title'; fillColor: Color transparent. >>> builder := MOFormsBuilder new. >>> builder column; center; fill; pref; grow. >>> builder row; center; pref; fill; grow; row; center; fill; pref; grow. >>> builder x: 1 y: 1 add: titleShape. >>> builder x: 1 y: 2 add: childrenShape. >>> umlClassShape := builder asShape. >>> >>> view nodeShape: umlClassShape. >>> view nodes: (1 to: 3) forEach: [:each | >>> view nodes: (1 to: 10) ] >>> >>> >>> Cheers, >>> Doru >>> >>> -- >>> www.tudorgirba.com >>> >>> "Not knowing how to do something is not an argument for how it cannot be done." >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > www.tudorgirba.com > > "We cannot reach the flow of things unless we let go." > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Maybe in theory, but why is it relevant?
Is it because of the explicit check from the ChildrenShape>>display:on: ? If so, that check should in the end go away :) Cheers, Doru On 10 Aug 2010, at 18:40, Alexandre Bergel wrote: > Doru, > > Can a form shape be manually created, not from a builder? I guess no. > > Cheers, > Alexandre > > > On 10 Aug 2010, at 01:04, Tudor Girba wrote: > >> Hi, >> >> Indeed, it starts to look good :). >> >> Now, the problem is that the two shapes are drawn on top of each >> other. >> >> We need to translate the canvas when drawing the children shape. >> >> Cheers, >> Doru >> >> >> On 10 Aug 2010, at 02:23, Alexandre Bergel wrote: >> >>> Hi! >>> >>> I may have fixed up the thing. >>> >>> Could you try: >>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>> | builder childrenShape titleShape umlClassShape | >>> >>> childrenShape := MOChildrenShape new. >>> titleShape := MORectangleShape new text: 'Title'. >>> builder := MOFormsBuilder new. >>> builder column; center; fill; pref; grow. >>> builder row; center; pref; fill; grow; row; center; fill; pref; >>> grow. >>> builder x: 1 y: 1 add: titleShape. >>> builder x: 1 y: 2 add: childrenShape. >>> umlClassShape := builder asShape. >>> >>> view nodeShape: umlClassShape. >>> view nodes: (1 to: 3) forEach: [:each | >>> view nodes: (1 to: 10) ] >>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>> >>> This is the same code, except that I removed the transparent color. >>> >>> Cheers, >>> Alexandre >>> >>> On 9 Aug 2010, at 08:22, Tudor Girba wrote: >>> >>>> Hi Alex, >>>> >>>> I would need your help in introducing the ChildrenShape. Without >>>> this, the FormsBuilder is highly underutilized. >>>> >>>> The problem I have is that currently the drawing of the nested >>>> graphs is handled on the Figure side, while it should be handled >>>> by the Shape. So, I would need your help to move this behavior >>>> while still preserving the caching logic. >>>> >>>> The ChildrenShape should then override the display:on: to display >>>> these elements. >>>> >>>> Would you have time to look into this? >>>> >>>> >>>> >>>> For example, the following code should define a umlClassShape: >>>> >>>> | builder childrenShape titleShape umlClassShape | >>>> >>>> childrenShape := MOChildrenShape new. >>>> titleShape := MORectangleShape new text: 'Title'; fillColor: >>>> Color transparent. >>>> builder := MOFormsBuilder new. >>>> builder column; center; fill; pref; grow. >>>> builder row; center; pref; fill; grow; row; center; fill; pref; >>>> grow. >>>> builder x: 1 y: 1 add: titleShape. >>>> builder x: 1 y: 2 add: childrenShape. >>>> umlClassShape := builder asShape. >>>> >>>> view nodeShape: umlClassShape. >>>> view nodes: (1 to: 3) forEach: [:each | >>>> view nodes: (1 to: 10) ] >>>> >>>> >>>> Cheers, >>>> Doru >>>> >>>> -- >>>> www.tudorgirba.com >>>> >>>> "Not knowing how to do something is not an argument for how it >>>> cannot be done." >>>> >>>> _______________________________________________ >>>> Moose-dev mailing list >>>> [hidden email] >>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> -- >> www.tudorgirba.com >> >> "We cannot reach the flow of things unless we let go." >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "When people care, great things can happen." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
> Maybe in theory, but why is it relevant?
Because I have written a test #testCoverage that makes sure all subclasses of MOShape that are not abstract are accessible to an end user. testCoverage ... self covers: [:shape | view nodes: (1 to: 5) using: shape forEach: [:each | view node: $a]] for: #typeOfMOViewRendererNodesUsingForEach. ... This helps identifying all the shapes that are available for an end user. I think that MOFormsShape should not be instantiated by an end user, but only through a builder. > Is it because of the explicit check from the ChildrenShape>>display:on: ? If so, that check should in the end go away :) That check helps me to understand how childrenShape, formshape, ShapeAdaptor and Figureadaptor work. Cheers, Alexandre > > > On 10 Aug 2010, at 18:40, Alexandre Bergel wrote: > >> Doru, >> >> Can a form shape be manually created, not from a builder? I guess no. >> >> Cheers, >> Alexandre >> >> >> On 10 Aug 2010, at 01:04, Tudor Girba wrote: >> >>> Hi, >>> >>> Indeed, it starts to look good :). >>> >>> Now, the problem is that the two shapes are drawn on top of each other. >>> >>> We need to translate the canvas when drawing the children shape. >>> >>> Cheers, >>> Doru >>> >>> >>> On 10 Aug 2010, at 02:23, Alexandre Bergel wrote: >>> >>>> Hi! >>>> >>>> I may have fixed up the thing. >>>> >>>> Could you try: >>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>>> | builder childrenShape titleShape umlClassShape | >>>> >>>> childrenShape := MOChildrenShape new. >>>> titleShape := MORectangleShape new text: 'Title'. >>>> builder := MOFormsBuilder new. >>>> builder column; center; fill; pref; grow. >>>> builder row; center; pref; fill; grow; row; center; fill; pref; grow. >>>> builder x: 1 y: 1 add: titleShape. >>>> builder x: 1 y: 2 add: childrenShape. >>>> umlClassShape := builder asShape. >>>> >>>> view nodeShape: umlClassShape. >>>> view nodes: (1 to: 3) forEach: [:each | >>>> view nodes: (1 to: 10) ] >>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>>> >>>> This is the same code, except that I removed the transparent color. >>>> >>>> Cheers, >>>> Alexandre >>>> >>>> On 9 Aug 2010, at 08:22, Tudor Girba wrote: >>>> >>>>> Hi Alex, >>>>> >>>>> I would need your help in introducing the ChildrenShape. Without this, the FormsBuilder is highly underutilized. >>>>> >>>>> The problem I have is that currently the drawing of the nested graphs is handled on the Figure side, while it should be handled by the Shape. So, I would need your help to move this behavior while still preserving the caching logic. >>>>> >>>>> The ChildrenShape should then override the display:on: to display these elements. >>>>> >>>>> Would you have time to look into this? >>>>> >>>>> >>>>> >>>>> For example, the following code should define a umlClassShape: >>>>> >>>>> | builder childrenShape titleShape umlClassShape | >>>>> >>>>> childrenShape := MOChildrenShape new. >>>>> titleShape := MORectangleShape new text: 'Title'; fillColor: Color transparent. >>>>> builder := MOFormsBuilder new. >>>>> builder column; center; fill; pref; grow. >>>>> builder row; center; pref; fill; grow; row; center; fill; pref; grow. >>>>> builder x: 1 y: 1 add: titleShape. >>>>> builder x: 1 y: 2 add: childrenShape. >>>>> umlClassShape := builder asShape. >>>>> >>>>> view nodeShape: umlClassShape. >>>>> view nodes: (1 to: 3) forEach: [:each | >>>>> view nodes: (1 to: 10) ] >>>>> >>>>> >>>>> Cheers, >>>>> Doru >>>>> >>>>> -- >>>>> www.tudorgirba.com >>>>> >>>>> "Not knowing how to do something is not an argument for how it cannot be done." >>>>> >>>>> _______________________________________________ >>>>> Moose-dev mailing list >>>>> [hidden email] >>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>> >>>> -- >>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>> Alexandre Bergel http://www.bergel.eu >>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>> >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Moose-dev mailing list >>>> [hidden email] >>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> -- >>> www.tudorgirba.com >>> >>> "We cannot reach the flow of things unless we let go." >>> >>> >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > www.tudorgirba.com > > "When people care, great things can happen." > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |