-- <<<- global theDemoPage := object (WebPage) title: "ScriptX Web Spinner Demo" base: theSXPrefix contents object (WebHeading) level: 1 contents "ScriptX Web Spinner Demo" end "This is a demo of the ScriptX Web Spinner, " "a set of classes for dyamically spinning HTML." object (WebHeading) level: 2 contents "Global Convenience Variables" end "webAmp: ", webAmp " webLt: ", webLt " webGt: ", webGt " webReg: ", webReg " webCopy: ", webCopy object (WebHeading) level: 2 contents "HTML Constructs" end object (WebHeading) level: 3 contents "WebGroup:" end object (WebGroup) contents "These ", "words ", "are ", "in ", "the ", "group." end object (WebHeading) level: 3 contents "WebList:" end object (WebList) contents "These", "words", "are", "in", "the", "list" end object (WebHeading) level: 3 contents "WebLink:" end object (WebLink) url: "#foo" contents "This is a link to the anchor named foo." end object (WebHeading) level: 3 contents "WebMacro:" end object (WebMacro) func: (self stream props -> (getAny self) + (theCalendarClock.date as String) + ".") contents "This macro returns one of the strings it contains. Now it's " "One of the strings this macro contains is returned. It's now " end object (WebHeading) level: 3 contents "WebProp:" end object (WebProp) prop:@dialog default:"There was no property named @dialog." end object (WebHeading) level: 3 contents "WebBulletedList:" end object (WebBulletedList) contents "This", "Is", "A", "Bulleted", "List" end object (WebHeading) level: 3 contents "WebNumberedList:" end object (WebNumberedList) contents "This", "Is", "A", "Numbered", "List" end object (WebHeading) level: 3 contents "WebPreformatted:" end object (WebPreformatted) contents "This is preformatted text.\r" " This is the next line.\r" " This is the last line.\r" end object (WebHeading) level: 3 contents "WebRawPreformatted:" end object (WebRawPreformatted) contents "This is raw preformatted text.\r" " This is the next line.\r" " This is the last line.\r" end object (WebHeading) level: 3 contents "WebComment:" end "You should not see the following comment: " object (WebComment) contents "This is a comment." end object (WebHeading) level: 3 contents "WebParagraph:" end object (WebParagraph) contents "This is a paragraph." end object (WebParagraph) contents "This is another paragraph." end object (WebHeading) level: 3 contents "WebBrokenLines:" end object (WebBrokenLines) contents "These", "Are", "Broken", "Lines" end object (WebHeading) level: 3 contents "WebNoBreak:" end object (WebNoBreak) contents "This line shouldn't be broken: " object (WebMacro) func: (self stream props -> local str := (new String) for i := 1 to 50 do ( (i as String) | str ", " | str ) "infinity." | str) end end object (WebHeading) level: 3 contents "WebLineBreak:" end "Here is a line break:" object (WebLineBreak) end "Owch, that hurt." object (WebHeading) level: 3 contents "WebWordBreak:" end "Here is a word" object (WebWordBreak) end "break" object (WebHeading) level: 3 contents "WebIsIndex:" end object (WebIsIndex) end object (WebHeading) level: 3 contents "WebHorizontalLine:" end object (WebHorizontalLine) end object (WebHeading) level: 3 contents "WebHeading:" end object (WebHeading) level: 1 contents "Level 1 Heading" end object (WebHeading) level: 2 contents "Level 2 Heading" end object (WebHeading) level: 3 contents "Level 3 Heading" end object (WebHeading) level: 4 contents "Level 4 Heading" end object (WebHeading) level: 3 contents "WebForm:" end object (WebForm) contents object (WebHiddenValue) name: "dialog" value: "Debug" end object (WebHeading) level: 3 contents "WebHiddenValue:" end "You can't see the hidden value here: " object (WebHiddenValue) name: "foo" value: "bar" end object (WebHeading) level: 3 contents "WebTextInput:" end object (WebTextInput) size: 80 maxLength: 80 contents "This is the text input contents." end object (WebHeading) level: 3 contents "WebPasswordInput:" end object (WebPasswordInput) size: 80 maxLength: 80 contents "This is the password input contents." end object (WebHeading) level: 3 contents "WebIntInput:" end object (WebIntInput) size: 8 maxLength: 8 contents "101" end object (WebHeading) level: 3 contents "WebCheckboxInput:" end "Ping:" object (WebCheckboxInput) name: "PingPong" value: "Ping" checked: true end "Pong:" object (WebCheckboxInput) name: "PingPong" value: "Pong" end object (WebHeading) level: 3 contents "WebRadioInput:" end "King:" object (WebRadioInput) name: "KingKong" value: "King" checked: true end "Kong:" object (WebRadioInput) name: "KingKong" value: "Kong" end object (WebHeading) level: 3 contents "WebSelect:" end object (WebSelect) size: 1 contents "Foo", "Bar", "Baz", "Bletch", "Yowzah" end object (WebSelect) size: 4 contents "Foo", "Bar", "Baz", "Bletch", "Yowzah" end object (WebSelect) size: 4 multiple: true contents "Foo", "Bar", "Baz", "Bletch", "Yowzah" end object (WebHeading) level: 3 contents "WebTextArea:" end object (WebTextArea) rows: 8 cols: 40 contents "This is a text area with\r" "8 rows and 40 columns." end object (WebHeading) level: 3 contents "WebSubmitInput:" end object (WebSubmitInput) contents "SUBMIT!!!" end object (WebHeading) level: 3 contents "WebResetInput:" end object (WebResetInput) contents "RESET!!!" end end object (WebHeading) level: 3 contents "WebFontSize:" end object (WebFontSize) size: "1" contents "This is size 1." end object (WebFontSize) size: "2" contents "This is size 2." end object (WebFontSize) size: "3" contents "This is size 3." end object (WebFontSize) size: "4" contents "This is size 4." end object (WebFontSize) size: "5" contents "This is size 5." end object (WebHeading) level: 3 contents "WebBaseFont:" end object (WebBaseFont) size: "5" end "Now the base font size is 5." object (WebLineBreak) end object (WebBaseFont) size: "3" end "Now the base font size is 3." object (WebHeading) level: 3 contents "WebIndent, WebIndentHeading, WebIndentDefinition:" end object (WebIndent) contents "This is not particularly indented." object (WebIndent) contents "This is indented." object (WebIndent) contents "This is indented even more." object (WebIndent) contents "And this is indented even more." end end end object (WebIndentHeading) contents "This is a heading." end object (WebIndentDefinition) contents "This is a definition." end object (WebIndentHeading) contents "This is another heading." end object (WebIndentDefinition) contents "This is another definition." end end object (WebHeading) level: 3 contents "WebCenter:" end object (WebCenter) contents "This is centered!" end object (WebHeading) level: 3 contents "WebEmphasis:" end object (WebEmphasis) contents "This has emphasis." end object (WebHeading) level: 3 contents "WebStrong:" end object (WebStrong) contents "This is strong." end object (WebHeading) level: 3 contents "WebCode:" end object (WebCode) contents "This is code." end object (WebHeading) level: 3 contents "WebSamp:" end object (WebSamp) contents "This is a sample." end object (WebHeading) level: 3 contents "WebBold:" end object (WebBold) contents "This is bold." end object (WebHeading) level: 3 contents "WebTypewriter:" end object (WebTypewriter) contents "This is typewriter." end object (WebHeading) level: 3 contents "WebItalic:" end object (WebItalic) contents "This is italic." end object (WebHeading) level: 3 contents "WebBlockQuote:" end object (WebBlockQuote) contents "This is a block quote." end object (WebHeading) level: 3 contents "WebAddress:" end object (WebAddress) contents "This is an address." end object (WebHeading) level: 3 contents "WebImage:" end "This is a pretty image:" object (WebLineBreak) end object (WebImage) url: "about:logo" end object (WebHeading) level: 3 contents "WebAnchor:" end object (WebAnchor) name: "foo" contents "This is an anchor named foo." end object (WebHeading) level: 3 contents "This is the end!" end end registerService theWebServer \ (new WebService \ name: "Demo" \ about: "Demonstrate the ScriptX web weaving classes!" \ handler: (service request params -> HTML theDemoPage)) -- >>>