UIPainter.st
changeset 2258 db98899b44d1
parent 2256 2bd9e855e6ac
child 2261 60725fccd12d
equal deleted inserted replaced
2257:badd429a2a2a 2258:db98899b44d1
   973 
   973 
   974     "Do not manually edit this!! If it is corrupted,
   974     "Do not manually edit this!! If it is corrupted,
   975      the UIPainter may not be able to read the specification."
   975      the UIPainter may not be able to read the specification."
   976 
   976 
   977     "
   977     "
   978      UIPainter new openOnClass:UIPainter andSelector:#dialogSpecForDefiningPortAndPagename
   978      UIPainter new openOnClass:UIPainter andSelector:#dialogSpecForDefiningPortAndPageName
   979      UIPainter new openInterface:#dialogSpecForDefiningPortAndPagename
   979      UIPainter new openInterface:#dialogSpecForDefiningPortAndPageName
   980     "
   980     "
   981 
   981 
   982     <resource: #canvas>
   982     <resource: #canvas>
   983 
   983 
   984     ^ 
   984     ^ 
   985      #(FullSpec
   985      #(FullSpec
   986         name: dialogSpecForDefiningPortAndPagename
   986         name: dialogSpecForDefiningPortAndPageName
   987         window: 
   987         window: 
   988        (WindowSpec
   988        (WindowSpec
   989           label: 'GUI Painter'
   989           label: 'GUI Painter'
   990           name: 'GUI Painter'
   990           name: 'GUI Painter'
   991           min: (Point 350 140)
   991           min: (Point 350 140)
  1010                     layout: (AlignmentOrigin 67 0.11 29 0 1 0.5)
  1010                     layout: (AlignmentOrigin 67 0.11 29 0 1 0.5)
  1011                     translateLabel: true
  1011                     translateLabel: true
  1012                     resizeForLabel: true
  1012                     resizeForLabel: true
  1013                     adjust: right
  1013                     adjust: right
  1014                   )
  1014                   )
  1015                  (InputFieldSpec
  1015                  (ComboBoxSpec
  1016                     name: 'serviceOrPortName'
  1016                     name: 'ComboBox1'
  1017                     layout: (LayoutFrame 70 0.11 18 0 4 1.0 40 0)
  1017                     layout: (LayoutFrame 70 0.11 18 0 4 1.0 40 0)
  1018                     tabable: true
       
  1019                     model: serviceOrPortNameChannel
  1018                     model: serviceOrPortNameChannel
  1020                     group: inputGroup
       
  1021                     acceptOnPointerLeave: false
  1019                     acceptOnPointerLeave: false
       
  1020                     comboList: runningServerPorts
  1022                   )
  1021                   )
  1023                  (LabelSpec
  1022                  (LabelSpec
  1024                     label: 'Pagename:'
  1023                     label: 'Pagename:'
  1025                     name: 'pageNameLabel'
  1024                     name: 'pageNameLabel'
  1026                     layout: (AlignmentOrigin 67 0.11 54 0 1 0.5)
  1025                     layout: (AlignmentOrigin 67 0.11 54 0 1 0.5)
  1048             )
  1047             )
  1049            )
  1048            )
  1050          
  1049          
  1051         )
  1050         )
  1052       )
  1051       )
  1053 
       
  1054     "Created: / 14-01-2008 / 16:54:20 / cg"
       
  1055 !
  1052 !
  1056 
  1053 
  1057 windowSpec
  1054 windowSpec
  1058     "This resource specification was automatically generated
  1055     "This resource specification was automatically generated
  1059      by the UIPainter of ST/X."
  1056      by the UIPainter of ST/X."
  4502 !
  4499 !
  4503 
  4500 
  4504 doInstallAsWebPage
  4501 doInstallAsWebPage
  4505     "lets user select a service, page-name and installs the page"
  4502     "lets user select a service, page-name and installs the page"
  4506 
  4503 
  4507     |again serviceOrPort pageName port serviceLinkName service server app|
  4504     |runningServerPorts again serviceOrPort pageName port serviceLinkName service server app|
  4508 
  4505 
       
  4506     runningServerPorts := (HTTPServer runningServers collect:[:s | s port printString]) asOrderedCollection sort.
  4509     serviceOrPort := lastPort ? LastPort ? '8080'.
  4507     serviceOrPort := lastPort ? LastPort ? '8080'.
  4510     pageName := lastPage ? LastPage ? 'myPage'.
  4508     pageName := lastPage ? LastPage ? 'myPage'.
  4511 
  4509 
  4512     [
  4510     [
  4513         again := false.
  4511         again := false.
  4514 
  4512 
  4515         aspects at:#serviceOrPortNameChannel put:serviceOrPort printString  asValue.
  4513         aspects at:#serviceOrPortNameChannel put:serviceOrPort printString  asValue.
  4516         aspects at:#pageNameNameChannel      put:pageName printString asValue.
  4514         aspects at:#pageNameNameChannel      put:pageName printString asValue.
       
  4515         aspects at:#runningServerPorts       put:runningServerPorts.
  4517 
  4516 
  4518         (self openDialogInterface:#dialogSpecForDefiningPortAndPageName) ifFalse:[^ nil].
  4517         (self openDialogInterface:#dialogSpecForDefiningPortAndPageName) ifFalse:[^ nil].
  4519 
  4518 
  4520         port := Integer readFrom:(aspects at:#serviceOrPortNameChannel) value onError:nil.
  4519         port := Integer readFrom:(aspects at:#serviceOrPortNameChannel) value onError:nil.
  4521         port isNil ifTrue:[
  4520         port isNil ifTrue:[