home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-21 | 734 b | 32 lines | [TEXT/ttxt] |
-
- ---<<<
-
- if not (isdefined tcpstream) do process (new loader) "loadable/web"
-
- class HTMLClient ()
- instance variables
- myDisplayer
- end
-
- method init self {object HTMLClient} #rest args -> (
- self.myDisplayer := new HTMLStream \
- startElement: (displayer element #rest args -> print #(@start, element, args)) \
- endElement: (displayer element -> print #(@end, element)) \
- putCharacter: (displayer ch -> print #(@ch, ch))
- )
-
- function test -> (
- local client := new HTMLClient
- writestring client.myDisplayer "<HTML>foo</HTML>bar"
- )
-
- function maketc -> (
- local tc := new titlecontainer dir: theScriptDir path: "web.sxt"
- append tc HTMLClient
- tc.startupAction := (tc -> foreach tc load undefined)
- close tc
- )
-
-
- --->>>
-