[Pharo-project] Polymorph - TabIndex and layoutFrames questions

nullPointer epicfan at gmail.com
Mon Sep 14 03:38:04 EDT 2009


I don´t know how do that. Seems very complicated for me.

I did think in each widgets implements a method where return his state. The
code will be more readable ( i believe ) and seems more easy of implement (
i believe too )

regards



2009/9/14 Stéphane Ducasse-2 (via Nabble) <
ml-user+179910-225159042 at n2.nabble.com<ml-user%2B179910-225159042 at n2.nabble.com>
>

> 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
> > [hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3640028&i=0>
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3640028&i=1>
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> ------------------------------
>  View message @
> http://n2.nabble.com/Polymorph-TabIndex-and-layoutFrames-questions-tp3638041p3640028.html
> To unsubscribe from Polymorph - TabIndex and layoutFrames questions, click
> here< (link removed) >.
>
>
>

-- 
View this message in context: http://n2.nabble.com/Polymorph-TabIndex-and-layoutFrames-questions-tp3638041p3640409.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20090914/fcd6a613/attachment-0001.html>


More information about the Pharo-dev mailing list