On Oct 9, 2011, at 3:28 PM, Igor Stasenko wrote:

> On 9 October 2011 08:58, Stéphane Ducasse <[email protected]> wrote:
>> At some point we should have a UI builder with specs like in vw.
>> I should do a little proto to show how it can work and that people 
>> understand the value and help but I want to finish rpackage and bootstrap 
>> first
> 
> with specs? then it will be same as toolbuilder, no?

No 
VWspec are declarative. Here is an example: composite structure. The UIBuilder 
takes that as input and produce a widget.

windowSpec
        "Tools.UIPainter new openOnClass: self andSelector: #windowSpec"

        <resource: #canvas>
        ^#(#{UI.FullSpec} 
                #window: 
                #(#{UI.WindowSpec} 
                        #label: 'Author Coloring Control' 
                        #bounds: #(#{Graphics.Rectangle} 535 279 823 658 ) ) 
                #component: 
                #(#{UI.SpecCollection} 
                        #collection: #(
                                #(#{UI.CompositeSpecCollection} 
                                        #collection: #(
                                                #(#{UI.SequenceViewSpec} 
                                                        #layout: 
#(#{Graphics.LayoutFrame} 0 0 0 0 0 1.0 0 1.0 ) 
                                                        #name: #AuthorList 
                                                        #model: #authorList 
                                                        #multipleSelections: 
true 
                                                        #useModifierKeys: true 
                                                        #selectionType: 
#checkMark ) ) 
                                        #compositeSpec: 
                                        #(#{UI.CompositeSpec} 
                                                #layout: 
#(#{Graphics.LayoutFrame} 0 0 25 0 0 1 0 1 ) 
                                                #name: #Composite1 ) ) 
                                #(#{UI.LabelSpec} 
                                        #layout: 
#(#{Graphics.LayoutSizedOrigin} 20 0.0 4 0 140 20 ) 
                                        #name: #Label1 
                                        #label: 'Select users to disable them:' 
) ) ) )




> my point is that the role of uimanager is to provide protocol(s) for
> basic stuff, and dont make it too wide.
> As for ui builder , i think it would be nice to have real ui editor
> which can serialize UI either into source code,

not in source code, in spec. 

> or since we have fuel, we can serialize it into a bunch of bytes and
> then store them either in file or in image.

Saving objects will lead to death as soon as we change the objects shape.

Stef


> 
>> Stef
>> 
>> 
>>>> Hi!
>>>> 
>>>> There is this method:
>>>> 
>>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>>> UIManager>>multiLineRequest: queryString centerAt: aPoint initialAnswer: 
>>>> defaultAnswer answerHeight: answerHeight
>>>>        "Create a multi-line instance of me whose question is queryString 
>>>> with
>>>>        the given initial answer. Invoke it centered at the given point, and
>>>>        answer the string the user accepts.  Answer nil if the user 
>>>> cancels.  An
>>>>        empty string returned means that the ussr cleared the editing area 
>>>> and
>>>>        then hit 'accept'.  Because multiple lines are invited, we ask that 
>>>> the user
>>>>        use the ENTER key, or (in morphic anyway) hit the 'accept' button, 
>>>> to
>>>>        submit; that way, the return key can be typed to move to the next 
>>>> line."
>>>> 
>>>>        self deprecated: 'Use multiLineRequest: queryString centerAt: 
>>>> aPoint initialAnswer: defaultAnswer answerHeight: ' on: '7 September 2011' 
>>>> in: 'Pharo1.4'.
>>>>        ^self subclassResponsibility
>>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>>> 
>>>> Apparently, the deprecation message says to use this very method. Which 
>>>> method should I use? Shall I open an entry?
>>>> 
>>> i really wonder why such things are there?
>>> UI manager has to provide a simple interface, without any
>>> sophisticated stuff, like multiline/multibutton etc.
>>> Lets stop bloating the interface, it leads nowhere.
>>> 
>>> 
>>> 
>>> 
>>> --
>>> Best regards,
>>> Igor Stasenko.
>>> 
>> 
>> 
>> 
> 
> 
> 
> -- 
> Best regards,
> Igor Stasenko.
> 


Reply via email to