I watch the video and this is cool

>> PS. I added recently the CLSplitterPanel widget ->
>> http://www.youtube.com/watch?v=qbd9bbfxNB4

In VisualWorks you use the builder and it generates a class for you
a bit in the same way then you code the missing code.

You said:

> Of course, but I don´t know do it of another way. Literal array is
> very
> complicated for me.
> Xml serialization and Moose serialization don´t be possible. The code
> generated is HUGE

and in VW all the interface is generated using the UIBuilder.
so I'm wondering why this is working

for example I could paste the following without any problem in a  
methods.
Then we could easily code a simple interpreter that perform: the  
message on an instance

for example
        #(#{UI.ActionButtonSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 115 
0.35 30 0 180 0.35 53 0 )
                                        #name: #removeButton
                                        #model: #removePattern
                                        #label: #(#{Kernel.UserMessage} #key: 
#Remove #defaultString:  
'Remove' #catalogID: #pdp)
                                        #defaultable: true )

        f := LayoutFrame new with: #(115 0.35 30 0 180 0.35 53 0)
                
        =>      
        ActionButton new
                layout: f;
                name: #removeButton
                
I do not know exactly the VW framework details but we can cerytainly  
interpret the following literal array.


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

        <resource: #canvas>
        ^#(#{UI.FullSpec}
                #window:
                #(#{UI.WindowSpec}
                        #label: #(#{Kernel.UserMessage} #key: 
#ContextListPolicyEditor  
#defaultString: 'Context list policy editor' #catalogID: #pdp)
                        #min: #(#{Core.Point} 528 401 )
                        #max: #(#{Core.Point} 1024 768 )
                        #bounds: #(#{Graphics.Rectangle} 592 427 1120 828 )
                        #flags: 4
                        #menu: #menuBar )
                #component:
                #(#{UI.SpecCollection}
                        #collection: #(
                                #(#{UI.LabelSpec}
                                        #layout: #(#{UI.AlignmentOrigin} 0 
0.175 5 0 0.5 0 )
                                        #name: #PatternListLabel
                                        #label: #(#{Kernel.UserMessage} #key: 
#Patterns #defaultString:  
'Patterns' #catalogID: #pdp) )
                                #(#{UI.SequenceViewSpec}
                                        #properties:
                                        #(#{UI.PropertyListDictionary} 
#dragOkSelector
                                                #wantToDrag: #dragEnterSelector
                                                #dragEnter: #dragOverSelector
                                                #dragOver: #dragStartSelector
                                                #doDrag: #dropSelector
                                                #drop: #dragExitSelector
                                                #dragLeave: )
                                        #layout: #(#{Graphics.LayoutFrame} 2 0 
30 0 0 0.35 -60 1 )
                                        #name: #patternList
                                        #model: #patternList
                                        #menu: #menu
                                        #useModifierKeys: true
                                        #selectionType: #highlight )
                                #(#{UI.ActionButtonSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 25 
0.35 30 0 90 0.35 53 0 )
                                        #name: #newButton
                                        #model: #newPattern
                                        #label: #(#{Kernel.UserMessage} #key: 
#New #defaultString: 'New'  
#catalogID: #pdp)
                                        #defaultable: true )
                                #(#{UI.ActionButtonSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 115 
0.35 30 0 180 0.35 53 0 )
                                        #name: #removeButton
                                        #model: #removePattern
                                        #label: #(#{Kernel.UserMessage} #key: 
#Remove #defaultString:  
'Remove' #catalogID: #pdp)
                                        #defaultable: true )
                                #(#{UI.InputFieldSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 13 
0.35 105 0 -9 0.75 128 0 )
                                        #name: #patternNameInput
                                        #model: #patternName )
                                #(#{UI.ActionButtonSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 8 
0.75 105 0 87 0.75 128 0 )
                                        #name: #colorButton
                                        #model: #selectColor
                                        #label: #(#{Kernel.UserMessage} #key: 
#PickColor #defaultString:  
'Pick Color' #catalogID: #pdp)
                                        #defaultable: true )
                                #(#{UI.TextEditorSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 13 
0.35 160 0 -8 1 -155 1 )
                                        #name: #TextEditor1
                                        #model: #patternString
                                        #tabRequiresControl: true )
                                #(#{UI.LabelSpec}
                                        #layout: #(#{Graphics.LayoutOrigin} 13 
0.35 85 0 )
                                        #name: #Label1
                                        #label: #(#{Kernel.UserMessage} #key: 
#Name #defaultString:  
'Name' #catalogID: #pdp) )
                                #(#{UI.LabelSpec}
                                        #layout: #(#{UI.AlignmentOrigin} 0 
0.675 137 0 0.5 0 )
                                        #name: #Label3
                                        #label: #(#{Kernel.UserMessage} #key: 
#PatternString  
#defaultString: 'Pattern String' #catalogID: #pdp) )
                                #(#{UI.GroupBoxSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 6 
0.35 65 0 -2 1 -145 1 )
                                        #name: #GroupBox1
                                        #label: #(#{Kernel.UserMessage} #key: 
#Pattern #defaultString:  
'Pattern' #catalogID: #pdp) )
                                #(#{UI.InputFieldSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 12 
0.35 -118 1 0 0.679924 -92  
1 )
                                        #name: #matchSelectorInputField
                                        #model: #matchSelector
                                        #type: #symbol )
                                #(#{UI.InputFieldSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 6 
0.68 -118 1 -8 1 -92 1 )
                                        #name: #conversionSelectorInputField
                                        #model: #conversionSelector
                                        #type: #symbol )
                                #(#{UI.LabelSpec}
                                        #layout: #(#{Graphics.LayoutOrigin} 12 
0.35 -137 1 )
                                        #name: #Label4
                                        #label: #(#{Kernel.UserMessage} #key: 
#MatchSelector  
#defaultString: 'Match Selector' #catalogID: #pdp) )
                                #(#{UI.LabelSpec}
                                        #layout: #(#{Graphics.LayoutOrigin} 6 
0.68 -137 1 )
                                        #name: #Label5
                                        #label: #(#{Kernel.UserMessage} #key: 
#ConversionSelector  
#defaultString: 'Conversion Selector' #catalogID: #pdp) )
                                #(#{UI.ActionButtonSpec}
                                        #layout: 
#(#{Graphics.LayoutSizedOrigin} -100 0.5 -33 1 80 23 )
                                        #name: #okButton
                                        #model: #accept
                                        #label: #(#{Kernel.UserMessage} #key: 
#Ok #defaultString: 'Ok'  
#catalogID: #pdp)
                                        #defaultable: true )
                                #(#{UI.ActionButtonSpec}
                                        #layout: 
#(#{Graphics.LayoutSizedOrigin} 20 0.5 -33 1 81 23 )
                                        #name: #cancelButton
                                        #model: #cancel
                                        #label: #(#{Kernel.UserMessage} #key: 
#Cancel #defaultString:  
'Cancel' #catalogID: #pdp)
                                        #defaultable: true )
                                #(#{UI.LabelSpec}
                                        #layout: #(#{Graphics.LayoutOrigin} 12 
0.35 -82 1 )
                                        #name: #Label2
                                        #label: #(#{Kernel.UserMessage} #key: 
#DisplayAllLimit  
#defaultString: 'Display all limit' #catalogID: #pdp) )
                                #(#{UI.SpinButtonSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 90 
0.35 -83 1 150 0.35 -60 1 )
                                        #name: #displayAllLimitField
                                        #model: #displayAllLimit
                                        #type: #number
                                        #formatString: '0'
                                        #low: 1
                                        #high: 100
                                        #interval: 1 )
                                #(#{UI.ActionButtonSpec}
                                        #layout: #(#{UI.AlignmentOrigin} -10 1 
-10 1 1 1 )
                                        #name: #HelpButton
                                        #model: #help
                                        #label: #(#{Kernel.UserMessage} #key: 
#Help #defaultString:  
'Help' #catalogID: #pdp)
                                        #defaultable: true )
                                #(#{UI.DividerSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 0 0 
-48 1 0 1 -44 1 )
                                        #name: #Divider1 ) ) ) )



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

Reply via email to