[Pharo-project] Polymorph - TabIndex and layoutFrames questions

Stéphane Ducasse stephane.ducasse at inria.fr
Mon Sep 14 06:03:40 EDT 2009


I gave you the code in the mail ;)
Nothing more or very little is required more than that.

Stef

On Sep 14, 2009, at 9:38 AM, nullPointer wrote:

> 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) <[hidden email]>
> 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://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> View this message in context: Re: [Pharo-project] Polymorph -  
> TabIndex and layoutFrames questions
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project





More information about the Pharo-dev mailing list