Hi Dennis,
I think the problem is the following:
- you have been using an old version of Roassal that does not have the padding for
resize strategy and
- you have upgraded, supposedly yesterday, to try my fix.
Two ways to fix the problem:
1 - Execute in your image: ROAbstractResizeStrategy resetAll. ROView resetNullView.
2 - or take a fresh moose image and try Quicksilver
Can you try again please?
There is a number of strategies to resize the parent as you have seen. Both
ROFixedSizedParent and ROPermissiveParent do not resize the parent node when children
nodes are added. Now, the different between the two is:
- ROFixedSizedParent makes sure that a child node cannot be dragged and dropped outside
its parent.
- ROPermissiveParent does not care if a children node is dragged and dropped outside its
parent.
When you should use ROPermissiveParent? I would say never. I did this to fix a performance
problem Usman spotted when doing a grid layout of inner node.
Try the following:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view |
view := ROView new.
el := ROBox element.
el @ RODraggable.
el extent: 100 @ 80.
el resizeStrategy: ROPermissiveParent instance.
"el resizeStrategy: ROFixedSizedParent instance."
el2 := ROBox green element.
el3 := ROBox red element.
el2 extent: 20 @ 20.
el3 extent: 20 @ 20.
el2 @ RODraggable.
el3 @ RODraggable.
el add: el2; add: el3.
view add: el.
view open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I have added this example in ROExample by the way.
Other strategy exist as you may have seen. Such as ROShrinkingParent and
ROExtensibleParent. ROExtensibleParent is the default one, used in the Mondrian builder.
Cheers,
Alexandre
On May 8, 2013, at 2:58 AM, Dennis Schenk <d.schenk(a)students.unibe.ch> wrote:
Hi Alexandre,
Thanks for looking into this.
When I do QsSystemViewer for: 'Zinc' now, I get an error that padding is nil of a
ROFixedSizedParent instance I'm using when drawing a layout.
I fixed that by changing:
visualRepresentationOfChildNode resizeStrategy: ROFixedSizedParent instance.
to:
visualRepresentationOfChildNode resizeStrategy: (ROFixedSizedParent instance paddingGap:
0).
But that is not very nice, I think. Wouldn't it make sense to have some default
values in place? Or to allow a nil value and interpret it as 0@0?
After I fixed that, the next bug appeared, again the same thing with padding being nil,
but this time when creating a ROPopup.
ROPopup:createElement is called, but then in
ROElement:addedInAnElement: el
self translateBy: el topLeft negated.
self translateBy: el resizeStrategy padding.
self parent: el; view: el view.
el addElement: self.
el adjustSizeIfNecessary
The padding is again nil for resizeStrategy. For ROPopup ROExtensibleParent is used.
I think there should be some check: if padding is nil or 0@0, no translation should be
attempted. What do you think?
Also a related question:
I saw that ROFixedSizeParent was changed in the ROTreemapLayout to ROPermissiveParent:
What is the difference between the two? When should one be used and when the other?
Cheers,
Dennis
On Wed, May 8, 2013 at 1:52 AM, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
I think I have solved the problem. Would you mind to check please?
This was tricky. The problem was due to the recent optimization I did: the rendering
queue was modified while being iterated.
Fortunately, I still had the implementation fresh in mind to solve the problem.
Update to Roassal 1.351
Cheers,
Alexandre
On May 7, 2013, at 3:23 PM, Dennis Schenk <d.schenk(a)students.unibe.ch> wrote:
Hi Alex,
With a fresh 2.0 image run the following:
Gofer new
smalltalkhubUser: 'Quicksilver' project: 'Quicksilver';
package: 'ConfigurationOfQuicksilver';
load.
ConfigurationOfQuicksilver loadDefault.
QsSystemViewer for: 'Zinc'
Cheers,
Dennis
On Tue, May 7, 2013 at 7:51 PM, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
How to reproduce the error?
Alexandre
On May 7, 2013, at 1:35 AM, Serge Stinckwich <serge.stinckwich(a)gmail.com> wrote:
Dear all,
I'm doing some experiments with QuickSilver, but I have always some
Morph issue when running an expression like this one: QsSystemViewer
for: 'Zinc'
I expand the node and try to zoom out. After a while, I have a broken
morph with red square and yellow cross. The problem apparently is
always in
ROView>>elementsToRenderDo: aBlock
Maybe a Roassal bug.
Regards,
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev