BTW I was thinking about your work (I still have to play with it).

IN MC UI they build the UI useing spec
look at buildWindow
buildWindow
        | window |
        window := SystemWindow labelled: self label.
        window model: self.
        self widgetSpecs do: [:spec |
                | send fractions offsets |
                send := spec first.
                fractions := spec at: 2 ifAbsent: [#(0 0 1 1)].
                offsets := spec at: 3 ifAbsent: [#(0 0 0 0)].
                window
                        addMorph: (self perform: send first withArguments: send 
allButFirst)
                        fullFrame:
                                (LayoutFrame
                                        fractions:
                                                ((fractions first)@(fractions 
second) corner:
                                                        (fractions 
third)@(fractions fourth))
                                        offsets:
                                                ((offsets first)@(offsets 
second)  corner:
                                                        (offsets 
third)@(offsets fourth)))].
        ^ window

buttonSpecs
        ^ #((Invert invert 'Show the reverse set of changes')
                 (Export export 'Export the changes as a change set'))
widgetSpecs
        ^ {
                #((listMorph:selection:menu:keystroke: list selection  
methodListMenu: methodListKey:from:) (0 0 1 0.4) (0 0 0 0)).
                { #(textMorph: annotations). #(0 0.4 1 0.4). { 0. 0. 0. self  
defaultAnnotationPaneHeight. } }.
                { #(textMorph: text). #(0 0.4 1 1). { 0. self  
defaultAnnotationPaneHeight. 0. 0. } }.
                }


this is minimal and not optimal but this is nice to have an array of  
literal to describe a UI

Stef


On Sep 13, 2009, at 10:48 PM, nullPointer wrote:

>
>
> 1- How i can change the #position or #extent of a Morph with a  
> layoutFrame
> setted ?
>
> for example, i have a button "anchored" to top and right; if i set the
> #position: of that button the position don´t change. Then i try  
> override the
> #position: accessor of my button; first set #layoutframe: to nil,  
> later do
> the set normally of #position:   and later set again the old value of
> #layoutFrame: , for remain the original anchors. But don´t works.  
> Well, if I
> execute the code in a WorkSpace, line to line, then works! but don´t  
> if
> execute all code. I don´t understand :|
>
>
> 2- How works the tab index mechanism in Polymorph?
>
> in some of my Views i have controls with unordered tab order in  
> controls.
> How i can change the order? I don´t see nothing for start.
>
> 3- Exists the possibility of change the position of cursor of a  
> textbox?
>
>
> Regards, and thanks for the help
>
> -- 
> View this message in context: 
> http://n2.nabble.com/Polymorph-TabIndex-and-layoutFrames-questions-tp3638041p3638041.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to