Index: xotcl/library/actiweb/HtmlPlace.xotcl =================================================================== diff -u -rf7894d9be99a8da3a04218abcdb9bd46b6d625c8 -r435b41481fb51bf000ebe736d8574fefbeec1710 --- xotcl/library/actiweb/HtmlPlace.xotcl (.../HtmlPlace.xotcl) (revision f7894d9be99a8da3a04218abcdb9bd46b6d625c8) +++ xotcl/library/actiweb/HtmlPlace.xotcl (.../HtmlPlace.xotcl) (revision 435b41481fb51bf000ebe736d8574fefbeec1710) @@ -1,4 +1,5 @@ -# $Id: HtmlPlace.xotcl,v 1.1 2004/05/23 22:50:39 neumann Exp $ +# $Id: HtmlPlace.xotcl,v 1.2 2005/09/09 21:07:23 neumann Exp $ + package provide xotcl::actiweb::htmlPlace 0.8 package require xotcl::trace @@ -7,30 +8,40 @@ package require xotcl::actiweb::agent package require xotcl::actiweb::pageTemplate -Class HtmlPlace -superclass Place -parameter {allowExit} +package require XOTcl -HtmlPlace instproc init args { - next - # - # just define a minimal object that can react - # with HTML decoration, if the called object - # doesn't exist - PageTemplateHtml create [self]::start.html +namespace eval ::xotcl::actiweb::htmlPlace { + namespace import ::xotcl::* - my startingObj [self]::start.html - if {[my exists allowExit]} { - set exitObj [WebObject create [self]::[my set allowExit]] - [Place getInstance] exportObjs $exitObj - $exitObj proc default {} {after 500 ::exit; return "Server terminates"} - } -} -HtmlPlace instproc default {} { - set place [string trimleft [self] :] - set msg "Place $place + Class HtmlPlace -superclass Place -parameter {allowExit} + + HtmlPlace instproc init args { + next + # + # just define a minimal object that can react + # with HTML decoration, if the called object + # doesn't exist + PageTemplateHtml create [self]::start.html + + my startingObj [self]::start.html + if {[my exists allowExit]} { + set exitObj [WebObject create [self]::[my set allowExit]] + [Place getInstance] exportObjs $exitObj + $exitObj proc default {} {after 500 ::exit; return "Server terminates"} + } + } + HtmlPlace instproc default {} { + set place [string trimleft [self] :] + set msg "Place $place

Place $place

Try one of the following links:\n" + foreach o [my exportedObjs] { + set o [string trimleft $o :] + append msg "
  • $o
  • " + } + append msg "\n" + } + + namespace export HtmlPlace } + +namespace import ::xotcl::actiweb::htmlPlace::*