Hi!

I am working on a popup support in Bloc and I am facing a problem. Consider the 
following code:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
        space := BlSpace new.
        space root layout: BlLinearLayout horizontal.
        10
                timesRepeat: [ | e |
                        e := (BlRectangle new extent: 20 @ 20) asElement.
                        e background: Color random.
                        space root addChild: e ].
        space root children withIndexDo: [ :e :index | e translateBy: (index * 
30) @ 10 ].

        space root children do: [ :e | 
                e
                addEventHandler:
                        (BlEventHandler
                                on: BlMouseEnterEvent
                                do: [ :evt | 
                                                | txt |
                                                txt := BlText new
                                                        position: evt position;
                                                        fill: Color red;
                                                        text: 'Hello World'.
                                                        
                                                e parent addChild: txt ]).

                 ].
        space show
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

If you uncomment the second line (“space root layout:…”), then the string hello 
world is added text to the element in which the mouse enter. With the layout, 
the string is added at the end of the line.

I like very much the idea of having the layout applied when elements are added 
(even I suspect we may have scalability issues very soon), but in that 
situation, this is not wished.

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply via email to