./xotcl-1.6.8/._aclocal.m4 000644 000765 000024 00000000430 12327655345 015706 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/aclocal.m4 000644 000765 000024 00000000030 12327655345 015465 0 ustar 00neumann staff 000000 000000 builtin(include,tcl.m4)
./xotcl-1.6.8/apps/actiweb/._AgentClient.xotcl 000644 000765 000024 00000000430 12161600406 021657 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/AgentClient.xotcl 000644 000765 000024 00000010455 12161600406 021452 0 ustar 00neumann staff 000000 000000 #!/usr/bin/env tclsh
# $Id: AgentClient.xotcl,v 1.5 2006/09/27 08:12:39 neumann Exp $
#if {![info exists ACTIWEB_HOME]} {source ~/actiweb/paths.xotcl}
package require XOTcl 1; namespace import -force xotcl::*
package require xotcl::package
package verbose 1
package require xotcl::actiweb::agent
package require xotcl::actiweb::httpPlace
Place p
set receiverHost localhost:8087
#
# if we migrate an object, we cannot send the result to [self]
# in this example we just use a small result printer object to
# print the result to the stderr stream
#
Object resultPrinter
resultPrinter proc printResult {o m code result} {
if {$code eq "OK"} {
puts stderr "[self] -- Result -- $m:\n$result"
} else {
puts stderr "[self] -- Error -- $m: \n$result"
}
}
Class CloneableClass -superclass {Agent Class}
CloneableClass AgentExample -superclass Agent -parameter {
{invokeAgent hallo.txt}
{invokeMethod content}
}
AgentExample proc test-calls {} {
#showObj [self]
set host [::set ::receiverHost]
my clone $host "" [list [self] class-cloned]
}
AgentExample proc class-cloned {args} {
my a1
my a2
my a3
my a4
a1 synchronousInvokeCall
a3 synchronousMigrateCall
a4 synchronousCloneCall
#a1 asynchronousInvokeCall
#a1 asynchronousCloneCall
#a2 asynchronousMigrateCall
exit
}
AgentExample instproc computeXXX args {
return XXX--[my set var1]--XXXX
}
AgentExample instproc init args {
next
my set var1 xyz
my persistent var1
}
AgentExample instproc synchronousInvokeCall args {
set host [::set ::receiverHost]
my instvar invokeAgent invokeMethod
puts stderr "*******************[self]: [self proc]"
puts stderr "Result: [my syncInvoke $host $invokeAgent $invokeMethod]"
}
AgentExample instproc synchronousMigrateCall args {
set host [::set ::receiverHost]
puts stderr "*******************[self]: [self proc]"
set result [my syncMigrate $host computeXXX]
puts stderr "Result: '$result'"
}
AgentExample instproc synchronousCloneCall args {
set host [::set ::receiverHost]
puts stderr "*******************[self]: [self proc]"
set result [my syncClone $host computeXXX]
puts stderr "Result: '$result'"
}
AgentExample instproc asynchronousInvokeCall args {
set host [::set ::receiverHost]
my instvar invokeAgent invokeMethod
puts stderr "*******************[self]: [self proc]"
my invoke [list resultPrinter printResult my INVOKE] $host $invokeAgent $invokeMethod
}
AgentExample instproc asynchronousCloneCall args {
set host [::set ::receiverHost]
puts stderr "*******************[self]: [self proc]"
my clone $host computeXXX [list resultPrinter printResult my CLONE]
}
AgentExample instproc asynchronousMigrateCall args {
set host [::set ::receiverHost]
puts stderr "*******************[self]: [self proc]"
my migrate $host computeXXX [list resultPrinter printResult my MIGRATE]
}
#AgentExample instproc callSet args {
# set host localhost:8087
# set agent welcome
#
# puts stderr INVOKE*******************************
# set r [my invoke $host welcome set+a+1]
# puts stderr result=$r
#}
AgentExample instproc destroy args {
next
}
Agent registryTest
registryTest proc test args {
set host localhost:8087
my createRequest "[self] testOnPlaceName $host" http://$host/
}
registryTest proc testOnPlaceName {host placeName} {
set place [Place getInstance]
set subject "http://[$place host]:[$place port]/[self]"
RDFdb [self]::db
[self]::db add "http://nestroy.wi-inf.uni-essen.de/schema/service#name" \
$subject registryTest
[self]::db add "http://nestroy.wi-inf.uni-essen.de/schema/xotcl#class" \
$subject [my info class]
#
# place info als bag machen ...
#
[self]::db add "http://nestroy.wi-inf.uni-essen.de/schema/agent#place" \
$subject $place
set rdfText [${place}::rdfCreator createFromTriples [[self]::db getTriples]]
[self]::db destroy
my invoke $host ${placeName}::registry register $rdfText
set r [my invoke $host ${placeName}::registry query registryTest]
puts "************************Query: $r\n"
set r [my invoke $host ${placeName}::registry queryProperty http://nestroy.wi-inf.uni-essen.de/schema/agent\#place ::p]
puts "************************QueryProperty: $r\n"
}
p exportedObjs client
#p startEventLoop "registryTest test"
#p startEventLoop "client callWelcome; registryTest test"
p startEventLoop "AgentExample test-calls"
./xotcl-1.6.8/apps/actiweb/._Counter.README 000644 000765 000024 00000000430 12161600406 020705 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/Counter.README 000644 000765 000024 00000003661 12161600406 020501 0 ustar 00neumann staff 000000 000000 * $Id: Counter.README,v 1.1 2004/05/23 22:50:39 neumann Exp $
*
* Variationen des Counter-Themas im ActiWeb:
* (Zeilenangaben ohne Kommentare und Leerzeilen)
*
*
1) Counter.xotcl (22 Zeilen)
Die Klasse Counter wird als Spezialisierung von HtmlDocument
definiert ("Ein Dokument mit weiteren Methoden")
Aufruf:
http://localhost:8090/counter-1.html
http://localhost:8090/counter-2.html
2) Counter2.xotcl (32 Zeilen)
Die Klasse Counter wird als Spezialisierung von WebAgent
definiert, der ein plain/text interface besitzt. Zusätzlich
wird eine Web-Facade definiert, die fuer die HTML-spezifische
Präsentation des WebAgenten sorgt.
Aufruf:
http://localhost:8091/htmlUI+invoke+c1
http://localhost:8091/htmlUI+invoke+c2
3) Counter3.xotcl (28 Zeilen)
Die Klasse Counter wird völlig unabhängig von jeder
Web-Nutzung definiert (Sachmodell). Als Spezialisierung
dieser Counter-Klasse wird die Klasse Web-Counter definiert,
die auch von HTML-Document erbt. Diese Klasse ist fuer
die HTML-Aufbereitung zuständig. Es werden Instanzen von
Web-Counter erzeugt.
Aufruf:
http://localhost:8093/c1
http://localhost:8093/c2
4) Counter4.xotcl (33 Zeilen)
Die Klasse Counter wird völlig unabhängig von jeder
Web-Nutzung definiert (Sachmodell). Ebenso unabhängig
von der Web-Nutzung wird PersistentCounter als
spezialisierte Counter-Klasse definiert. Von diesen persistenten
Countern werden Instanzen gebildet (web-unabhaengig).
Als weitere Instanzen werden Proxy-Objekte erzeugt,
die für die HTML-Aufbereitung zuständig sind, und die
hereinkommende Requests an die im "Hintergrund" existierenden
eigentlichen Objekte weitergeben, und deren Ergebnisse
entsprechend aufbereiten. Es werden nur die Proxy-Objekte
exportiert, nur diese sind ueber den Web-Server ansprechbar.
Aufruf:
http://localhost:8094/wc1
http://localhost:8094/wc2
./xotcl-1.6.8/apps/actiweb/._Counter.xotcl 000644 000765 000024 00000000430 12161600406 021101 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/Counter.xotcl 000644 000765 000024 00000002740 12161600406 020672 0 ustar 00neumann staff 000000 000000 #!../../src/xotclsh
# $Id: Counter.xotcl,v 1.4 2006/09/27 08:12:39 neumann Exp $
#load /Users/neumann/src/xotcl-1.4.1/library/store/XOTclSdbm/libxotclsdbm1.2.dylib
array set opts {-pkgdir .}; array set opts $argv
lappend auto_path $opts(-pkgdir)
package require XOTcl 1 1; namespace import -force xotcl::*
package require xotcl::actiweb::htmlPlace
package require xotcl::actiweb::webDocument
### Instantiate an Html place with the name receive and port 8090
HtmlPlace ::receiver -port 8090 -allowExit exit
### Define a class Counter as a special Html Document
Class Counter -superclass HtmlDocument -parameter {{count 0}}
Counter instproc init args { ;### Constructor
next
my persistent count ;### make count variable persistent
::receiver exportObjs [self] ;### export the counter object
my exportProcs increment ;### export counter's increment method
}
Counter instproc default {} { ;### Method for updating HTML page
set objName [string trimleft [self] :]
return "The value in $objName is now: [my set count].
Increment Counter
Last Update: [clock format [clock seconds]]
\n"
}
Counter instproc increment {} { ;### exported increment method
my incr count
return [my default]
}
### Create two counter instances with the names
### counter-1.html and counter-2.html
Counter counter-1.html
Counter counter-2.html
### Start event loop and handle connections
receiver startEventLoop
./xotcl-1.6.8/apps/actiweb/._Counter2.xotcl 000644 000765 000024 00000000430 12161600406 021163 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/Counter2.xotcl 000644 000765 000024 00000004301 12161600406 020747 0 ustar 00neumann staff 000000 000000 #!../../src/xotclsh
# $Id: Counter2.xotcl,v 1.3 2005/09/09 21:09:01 neumann Exp $
array set opts {-pkgdir .}; array set opts $argv
lappend auto_path $opts(-pkgdir)
package require XOTcl 1 1; namespace import -force xotcl::*
package require xotcl::actiweb::htmlPlace
package require xotcl::actiweb::pageTemplate
HtmlPlace ::receiver -port 8091 -allowExit exit
###
### The counter class is an agent implementing the business logic
###
Class Counter -superclass Agent -parameter {{count 1}}
Counter instproc init args { ;### Constructor
next ;### Call superclass constructor
my persistent count ;### make count variable persistent
}
Counter instproc increment {} { ;### increment method
my incr count
}
### Create two counter instances c1/c2
Counter c1
Counter c2
###
### Define a specialization of web object as a facade to the counters
### The Page Template Mixin defines the HTML appearance
###
### Define an HTML Page Template
Class WebCounter -superclass WebObject \
-instmixin PageTemplateHtml -parameter {counter}
WebCounter instproc init args {
next
[my set place] exportObjs [self] ;### export the web counter object
my exportProcs increment ;### export counter's increment method
}
WebCounter instproc increment {} { ;### A method that decorates increment with HTML appearence
my instvar counter ;### import var that stores shielded web agent
$counter [self proc] ;### call the actual method on the web agent
my default ;### update HTML page
}
WebCounter instproc default {} { ;### Method for updating HTML page
my instvar count counter ;### importiere var that stores shielded web agent
$counter instvar count ;### importiere count var
#
# and create web-page with counter content
#
my simplePage [self] "Html-Facade for $counter using a page template" \
"The value in $counter is $count.
Increment Counter
"
}
#
# create two web-facade instances; one for each counter
#
WebCounter web-c1 -counter c1
WebCounter web-c2 -counter c2
### Start event loop and handle connections
receiver startEventLoop
./xotcl-1.6.8/apps/actiweb/._Counter3.xotcl 000644 000765 000024 00000000430 12161600406 021164 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/Counter3.xotcl 000644 000765 000024 00000003143 12161600406 020753 0 ustar 00neumann staff 000000 000000 #!../../src/xotclsh
# $Id: Counter3.xotcl,v 1.1 2004/05/23 22:50:39 neumann Exp $
array set opts {-pkgdir .}; array set opts $argv
lappend auto_path $opts(-pkgdir)
package require XOTcl 1 1; namespace import -force xotcl::*
package require xotcl::actiweb::htmlPlace
package require xotcl::actiweb::webDocument
### Instantiate an Html place with the name receiver
HtmlPlace ::receiver -port 8093 -allowExit exit
### Define a class solely for counting
Class Counter -parameter {{count 1}}
Counter instproc increment {} { ;### counter method
my incr count
}
### Define a special WebCounter as a specialization of the Counter class
Class WebCounter -superclass {Counter HtmlDocument}
WebCounter instproc init args { ;### Constructor
next
my persistent count ;### make count variable persistent
::receiver exportObjs [self] ;### export the counter object
my exportProcs increment ;### export increment method
}
WebCounter instproc default {} { ;### Method for updating HTML page
set objName [string trimleft [self] :]
return "The value in $objName is [my set count].
Increment Counter
Last Update: [clock format [clock seconds] -format %m/%d/%y-%H:%M]
\n"
}
WebCounter instproc increment {} { ;### exported increment method
next ;### call superclasses' increment
my default ;### display the result as HTML
}
### Create two web counter instances with the names c1 and c2
WebCounter c1
WebCounter c2
### Start event loop and handle connections
receiver startEventLoop
./xotcl-1.6.8/apps/actiweb/._Counter4.xotcl 000644 000765 000024 00000000430 12161600406 021165 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/Counter4.xotcl 000644 000765 000024 00000003551 12161600406 020757 0 ustar 00neumann staff 000000 000000 #!../../src/xotclsh
# $Id: Counter4.xotcl,v 1.2 2004/07/27 21:39:46 neumann Exp $
array set opts {-pkgdir .}; array set opts $argv
lappend auto_path $opts(-pkgdir)
package require XOTcl 1 1; namespace import -force xotcl::*
package require xotcl::actiweb::htmlPlace
package require xotcl::actiweb::webDocument
### Instantiate an Html place with the name receiver
HtmlPlace ::receiver -port 8094 -allowExit exit
### Define a class solely for counting
Class Counter -parameter {{count 1}}
Counter instproc increment {} { ;### counter method
my incr count
}
### Define a Counter subclass for persistent counting
Class PersistentCounter -superclass Counter
PersistentCounter instproc init args { ;### Constructor
next ;### call superclasses' init
my mixinStrategy Persistent=Eager
my persistenceMgr [Place getInstance]::agentPersistenceMgr
my persistent count ;### make count variable persistent
}
### Create two persistent counter instances with the names c1 and c2
PersistentCounter c1
PersistentCounter c2
### Define a proxy class, that handles HTML decoration
### HtmlProxy forwards all unknown calls to "realSubject"
Class HtmlProxyCounter -superclass HtmlProxy
HtmlProxyCounter instproc init args { ;### Constructor
next
my exportProcs increment ;### export increment method
}
HtmlProxyCounter instproc default {} {
my instvar realSubject
$realSubject instvar count
set objName [string trimleft [self] :]
return "The value in $realSubject is $count.
Increment Counter
Last Update: [clock format [clock seconds] -format %m/%d/%y-%H:%M]
]
\n"
}
### Create two proxy instances wc1 und wc2
HtmlProxyCounter wc1 -realSubject c1
HtmlProxyCounter wc2 -realSubject c2
### Start event loop and handle connections
receiver startEventLoop
./xotcl-1.6.8/apps/actiweb/._examples.README 000644 000765 000024 00000000430 12161600406 021104 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/examples.README 000644 000765 000024 00000004010 12161600406 020665 0 ustar 00neumann staff 000000 000000 * $Id: examples.README,v 1.1 2004/05/23 22:50:39 neumann Exp $
*
* This directory contains several simple ActiWeb introductory examples
*
*
* 4 Variations of the counter theme:
*
1) Counter.xotcl (22 lines)
The class counter is a special HtmlDocument that is made active
by adding methods to the document.
After starting the program, you can call it from your web browser:
http://localhost:8090/counter-1.html
http://localhost:8090/counter-2.html
2) Counter2.xotcl (32 lines)
The Class Counter is a special WebAgent, with a plain/text
interface. Additionally it has an HTML Facade that shields
the sub-system and allows to access the web agent with an
HTML presentation.
The plain/text interface is:
http://localhost:8091/c1
http://localhost:8091/c2
The web facades are:
http://localhost:8091/web-c1
http://localhost:8091/web-c2
3) Counter3.xotcl (28 lines)
This example demonstrates how an existing business logic (here:
a small Counter class) can be enhanced with a web representation.
A class WebCounter inherits from Counter and from HtmlDocument.
The two web counter instances are accessible via:
http://localhost:8093/c1
http://localhost:8093/c2
4) Counter4.xotcl (33 lines)
The Counter class and a derived persistent counter are
independent of any web usage. Two instances c1 and c2 -- that
are inpendent from the usage as web counters -- are created.
Two proxy object w1 and w2 handle the HTML decoration and forward
the calls to the persistent counter instances c1/c2 as the real
subjects for handling the calls. Only the proxies are exported, because
c1/c2 can not be reached via the web server.
Calls:
http://localhost:8094/wc1
http://localhost:8094/wc2
*
* A simple Multiple Choice Test: MC.xotcl
*
The multiple choice test implements a simple test and evaluation
and a web facade for the test.
Calls:
http://localhost:8092/Gustaf.html
http://localhost:8092/Uwe.html
./xotcl-1.6.8/apps/actiweb/._FormsWithState.xotcl 000644 000765 000024 00000000430 12161600406 022405 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/FormsWithState.xotcl 000644 000765 000024 00000015301 12161600406 022173 0 ustar 00neumann staff 000000 000000 #!../../src/xotclsh
# $Id: FormsWithState.xotcl,v 1.1 2004/05/23 22:50:39 neumann Exp $
#
# Demo Program for Multi-Page Forms implemented via hidden
# Form Fields -gn
#
package require XOTcl 1; namespace import -force xotcl::*
package require xotcl::actiweb::htmlPlace
package require xotcl::actiweb::webDocument
HtmlPlace receiver -port 8086
# The following class is used to define HTML-pages
Class HTMLPage -superclass HtmlDocument -parameter {
{pageContent ""}
{pageTitle ""}
{pageHeader ""}
endCmd
}
HTMLPage instproc init args {
receiver exportObjs [self]
next
}
# instproc default is evoked whenever an HTMLDocument object
# is called without a specific method.
HTMLPage instproc default args {
my instvar content
# creates HTML page content
set content
append content \
[my set pageTitle] \
[my set pageHeader] \n \
[my set pageContent]
# substitutes all embedded commands and variables in content
set content [subst $content]
# An HTMLPage can provide a command, which is executed after
# the content is computed; this mechanism is used here for deleting
# the context object
if {[my exists endCmd]} {
eval [my set endCmd]
}
# next sends content to the client
next
}
# The form state is kept in a context object. The method varname
# accesses variables from the context object or returns empty values.
HTMLPage instproc get varname {
my instvar context
if {[$context exists $varname]} {
return [$context set $varname]
} else {
return ""
}
}
# The final page will contain a table with all the variables in
# the context object
HTMLPage instproc printAll {} {
my instvar context
set result "
|
Submission
You submitted the following values:
|
| | \n"
# creates a table row for each variable and
# it's value of the current context object
foreach var [$context info vars] {
append result $var: | \
[$context set $var] | \n
}
return "$result \n |
"
}
HTMLPage form1
form1 proc default {} {
set values {}
# process the form data from post method
foreach a [my getFormData] {
set name [$a set name]
switch -glob $name {
*.html {set nextPage $name}
context {set context [$a set content]}
default {lappend values $name [$a set content]}
}
}
# save the form data in the context object
foreach {name value} $values {
$context set $name $value
}
if {![info exists nextPage]} {
# We assume, we are called the first time...
# Create a new context object and call the first page
set context [Object new]
set nextPage [self]/page1.html
}
$nextPage set context $context
# delegeate to the actual form page
$nextPage default
}
HTMLPage form1/page1.html -pageTitle "First Page" -pageContent {
\n"
### create simple HTML Page
my simplePage [$exam name] \
"Exam [$exam name] for [string trimleft $testObject :] \
(Exam: $exam)" $htmlText
}
WebExam instproc result {} { ;# This method analyses the results of the test
my instvar testObject ;### import var that stores shielded test
set exam [$testObject exam]
$testObject instvar individualTest alternatives
foreach question $individualTest alts $alternatives {
foreach a $alts {set ca($a) 0}
}
foreach a [my getFormData] {set ca([$a set content]) 1}
set htmlText "You have answered:"
array set answerText {0 " -- answered no\n" 1 " -- answered yes\n"}
array set correctText {0 "\n -- Wrong.
\n" 1 "\n -- Correct.
\n"}
set correctAnswers 0
foreach q $individualTest {
set correct 1
append htmlText "- [[$exam pool]::$q text]:
\n"
foreach alternative [[$exam pool]::$q info children] {
set altCorrect [expr {$ca($alternative) == [$alternative correct]}]
append htmlText [$alternative text]\n \
$answerText($ca($alternative)) \
$correctText($altCorrect)
set correct [expr {$correct && $altCorrect}]
}
if {$correct} {incr correctAnswers}
}
append htmlText
\n
if {$correctAnswers < [$exam requiredCorrect]} {
my simplePage [self] "Sorry" "$htmlText\
Only $correctAnswers question were answered correctly. You have not succeeded :("
} else {
my simplePage [self] "Congratulations" "$htmlText\
$correctAnswers questions were answered correctly. You have succeeded :-)"
}
}
WebExam instproc init args {
next
[my place] exportObjs [self] ;# export object
my exportProcs result ;# export methods
}
# Create a Pool P with 6 example questions with 3 alternatives for each.
Pool p
Pool::Question p::1 \
-text "When was the first XOTcl Version released?" -alternatives {
"1998" 0
"1999" 1
"2000" 0
}
Pool::Question p::2 -text "Who is author of XOTcl?" -alternatives {
"Gustaf Neumann" 1
"Mika Haekinnen" 0
"Uwe Zdun" 1
}
Pool::Question p::3 -text "Which of the systems are other OO extensions of Tcl?" \
-alternatives {
"XTCL" 0
"ITCL" 1
"OTCL" 1
}
Pool::Question p::4 \
-text "Which methods are provided by the Object class?" -alternatives {
"set" 1
"instvar" 0
"filter" 1
}
Pool::Question p::5 \
-text "Which methods are provided by the Object class?" -alternatives {
"unset" 1
"instproc" 0
"mixin" 1
}
Pool::Question p::6 \
-text "Which methods are provided by the Class class?" -alternatives {
"proc" 0
"instproc" 1
"mixin" 0
}
### Define an exam
Exam xotclTest \
-pool p \
-name "XOTcl Test" \
-questions {1 2 3 4 5} \
-requiredCorrect 4
### Define two Student tests with the XOTcl Test
foreach {Student ID} {
Uwe 7850247
Gustaf 7850248
} {
## Define the individual exams
IndividualExam $Student -exam xotclTest -ID $ID
### Define a web facade for each student
WebExam $Student.html -testObject $Student
}
receiver startEventLoop
./xotcl-1.6.8/apps/actiweb/._Receiver.xotcl 000644 000765 000024 00000000430 12161600406 021226 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/Receiver.xotcl 000644 000765 000024 00000001226 12161600406 021015 0 ustar 00neumann staff 000000 000000 #!/usr/bin/env tclsh
#if {![info exists ACTIWEB_HOME]} {source ~/actiweb/paths.xotcl}
package require XOTcl 1; namespace import -force xotcl::*
package require xotcl::actiweb::htmlPlace
package require xotcl::actiweb::webDocument
HtmlPlace receiver -port 8087
HtmlDocument hallo.txt -content "************ HALLO *************"
receiver exportObjs hallo.txt
hallo.txt exportProcs content
#hallo.txt attachFile ~/public_html/index.html
Class CloneableClass -superclass {Agent Class}
FileObjectifier do
do objectifyTree receiver ~/public_html
#GraphicDirectoryObjectifier gdo
#gdo objectifyTree receiver ~www/bilder/Einweihung/disk1/
receiver startEventLoop
./xotcl-1.6.8/apps/actiweb/._securePlaceDemo.xotcl 000644 000765 000024 00000000430 12161600406 022522 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/securePlaceDemo.xotcl 000644 000765 000024 00000005476 12161600406 022324 0 ustar 00neumann staff 000000 000000
package require XOTcl 1; namespace import -force xotcl::*
# DEMO OF USE OF ACTIWEB AND SSL
# 03/09/01 klaus.kolowratnik@wu-wien.ac.at
# version 0.806
# USAGE:
#
# For secure http connections under Tcl or XOTcl we need the tls-package.
# The following code was tested with tls-version 1.4 successfully.
# Download the tls1.4-package from the TLS-Homepage
# (http://sourceforge.net/projects/tls/) and install the
# tarball (tls1.4.1-linux-x86.tar.gz) in your local filesystem.
# You have to append the path of the tls-package to the
# Tcl-variable "auto_path" as seen in the example below
#
# lappend auto_path $homeDir/tls1.4 $homeDir/projects/actiweb
#
# Don't forget to add the tls-package to your "pkgIndex.tlc"-file!
#
# package ifneeded tls 1.4 "[list load [file join $dir libtls1.4.so] ] ; \
# [list source [file join $dir tls.tcl]]"
#
# For secure http connections ("http://...") we need at least the Actiweb/XOTcl-
# package "secureHtmlPlace":
#
# package require xotcl::actiweb::secureHtmlPlace
# package require xotcl::actiweb::webDocument
#
# We have to register the private server-keyfile and the certifcates
# of the local server and the certification authority.
# If you want to create own self-signed certificates, you can use the
# "SimpleCA"-Certification Authority (http://users.skynet.be/ballet/joris/SimpleCA).
#
# This example uses the following certificates and key-files:
#
# server.key private key of the local server which is run by this program
# server.pem certificate of the local server which is run by this program
# in PEM-format
# cacert.pem certificate of the certification authority
#
#
# SecureHtmlPlace ::receiver -port 8443 -keyfile server.key \
# -certfile server.pem -cafile cacert.pem
#
# With this changes a https-server with XOTcl can be run.
#
# 2003/11/19 Klaus.Kolowratnik@wu-wien.ac.at
set homeDir ~h9252717; # home-directory of Klaus
lappend auto_path $homeDir/packages
package require xotcl::actiweb::htmlPlace
package require xotcl::actiweb::secureHtmlPlace
package require xotcl::actiweb::webDocument
#HtmlPlace ::receiver -port 8445
SecureHtmlPlace ::receiver -port 8445 -keyfile server.key -certfile server.pem -cafile cacert.pem
HtmlDocument test-1.txt -content "************ TEST-1 *************"
::receiver exportObjs test-1.txt
test-1.txt exportProcs content
#test-1.txt attachFile ~/public_html/index.html
HtmlDocument test-2.txt -content "************ TEST-2 *************"
::receiver exportObjs test-2.txt
test-2.txt exportProcs content
set readme "This Web-Server uses XOTcl (www.xotcl.org) and Actiweb"
HtmlDocument readme.txt -content $readme
::receiver exportObjs readme.txt
readme.txt exportProcs content
FileObjectifier do
do objectifyTree ::receiver ~/public_html
#GraphicDirectoryObjectifier gdo
#gdo objectifyTree ::receiver ~www/bilder/Einweihung/disk1/
::receiver startEventLoop
./xotcl-1.6.8/apps/actiweb/univ/._server.key 000644 000765 000024 00000000430 12161600406 021410 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/univ/server.key 000644 000765 000024 00000001567 12161600406 021207 0 ustar 00neumann staff 000000 000000 -----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDVg+HdA4RAKyYRaxKRSdAw7mQpephZslIf/ZR7Oe3RKZjxu7Sj
PYG56GSc8y6hiaKuGnDmJcEGXZCXWNtUuACVsNlFrlVbGSEfAbXbz6H4eaaX2d2P
KzrjOc//8+5emaFZRelVTYY4sWNLcCuWV2FIhwMJMblYieXM6iEQg4XzdQIDAQAB
AoGAVdY2OC8QvOdb34bHKSeejf1YwSArHWxF/dxpE/0e8YaimRQYM8QnYgDeagaN
yZ1WjF3O44dsCU4WMfIkAvQSL19RLSgT+jPb3Uu9Aotwmg4x+55BKctRphXKiIfu
+a0IfAFDIt8FMRS08AoSB6eBgOBlhTZM2Y0IuC6QTqaBcwUCQQD5XSiEzh44uMOl
N4FbO0MI2NC3pbPg5u1fEJtIawoYOYxbeGHrlOYO2ZN3ZP6+2g5V0kX5tMMeObhE
qQLlmNETAkEA2zJ/Tk3IE5ByEBcGjG26nJ1zLlY13NaiIg+AoSP+7rHg5TPhoQp1
VVwcqd4ZWCyqgYDFl2TsiiZwKcEIFJBCVwJBANoLpZSLD04V8a2UXV5C8ZjYzZjo
IeP0yXco9D9cqZUJLTwGhckTiB9QDWyHOWH1FjfhCCMS9tKFMiWHi+rrt1UCQQDC
rlvxURX1gmI8NicjzEVk2la1fe5C4QKJW9lzxUOj/qpvB6BK5r4FfVUb7d32uV0K
vjNAXmvT24XdH8usb9/rAkBR1sqUkqwwm0CSe0Rz9IhSlkwWlmvEzSmEguqrd7Zb
rbYJ9NTnV1uFSAX9vcU7lDRp69il6XmyhOL06FYLRaNa
-----END RSA PRIVATE KEY-----
./xotcl-1.6.8/apps/actiweb/univ/._server.pem 000644 000765 000024 00000000430 12161600406 021401 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/univ/server.pem 000644 000765 000024 00000006764 12161600406 021204 0 ustar 00neumann staff 000000 000000 issuer :/C=DE/ST=NRW/L=Essen/O=University of Essen/OU=SWT/CN=Fredj Dridi/Email=Fredj.Dridi@uni-essen.de
subject:/C=DE/ST=NRW/L=Essen/O=University of Essen/OU=SWT/CN=tp600e.wi-inf.uni-essen.de/Email=dridi@tp600e.wi-inf.uni-essen.de
serial :01
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1 (0x1)
Signature Algorithm: md5WithRSAEncryption
Issuer: C=DE, ST=NRW, L=Essen, O=University of Essen, OU=SWT, CN=Fredj Dridi/Email=Fredj.Dridi@uni-essen.de
Validity
Not Before: Apr 28 08:21:19 2000 GMT
Not After : Apr 28 08:21:19 2001 GMT
Subject: C=DE, ST=NRW, L=Essen, O=University of Essen, OU=SWT, CN=tp600e.wi-inf.uni-essen.de/Email=dridi@tp600e.wi-inf.uni-essen.de
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit)
Modulus (1024 bit):
00:d5:83:e1:dd:03:84:40:2b:26:11:6b:12:91:49:
d0:30:ee:64:29:7a:98:59:b2:52:1f:fd:94:7b:39:
ed:d1:29:98:f1:bb:b4:a3:3d:81:b9:e8:64:9c:f3:
2e:a1:89:a2:ae:1a:70:e6:25:c1:06:5d:90:97:58:
db:54:b8:00:95:b0:d9:45:ae:55:5b:19:21:1f:01:
b5:db:cf:a1:f8:79:a6:97:d9:dd:8f:2b:3a:e3:39:
cf:ff:f3:ee:5e:99:a1:59:45:e9:55:4d:86:38:b1:
63:4b:70:2b:96:57:61:48:87:03:09:31:b9:58:89:
e5:cc:ea:21:10:83:85:f3:75
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Authority Key Identifier:
keyid:D2:B8:E3:2D:A2:5A:22:78:3A:38:F1:1F:F5:7C:AD:8D:A6:C4:41:0F
X509v3 Extended Key Usage:
TLS Web Server Authentication, TLS Web Client Authentication, Microsoft Server Gated Crypto, Netscape Server Gated Crypto
X509v3 Basic Constraints: critical
CA:FALSE
Signature Algorithm: md5WithRSAEncryption
38:b5:a1:1c:93:c4:aa:6e:3f:d6:ea:11:7f:7b:2b:11:db:7b:
22:b3:d2:a8:b3:f3:20:64:6a:25:b4:fe:0d:ac:12:49:a0:6e:
6d:ef:fb:99:a2:7c:bc:50:b0:eb:42:ef:0a:32:fa:a9:69:e0:
11:10:9b:00:05:15:97:59:ac:dc:5f:f2:cd:81:28:3e:e6:96:
86:f4:d7:99:71:52:c3:ca:0f:4a:48:d8:66:b0:da:e8:d1:45:
84:c4:12:b2:43:ec:63:b6:25:e8:0a:5a:4c:fb:e2:ec:03:36:
6f:cd:f9:2a:5c:52:ba:02:29:92:f5:bf:c4:96:ff:9e:ed:a3:
cf:02
-----BEGIN CERTIFICATE-----
MIIDIjCCAougAwIBAgIBATANBgkqhkiG9w0BAQQFADCBljELMAkGA1UEBhMCREUx
DDAKBgNVBAgTA05SVzEOMAwGA1UEBxMFRXNzZW4xHDAaBgNVBAoTE1VuaXZlcnNp
dHkgb2YgRXNzZW4xDDAKBgNVBAsTA1NXVDEUMBIGA1UEAxMLRnJlZGogRHJpZGkx
JzAlBgkqhkiG9w0BCQEWGEZyZWRqLkRyaWRpQHVuaS1lc3Nlbi5kZTAeFw0wMDA0
MjgwODIxMTlaFw0wMTA0MjgwODIxMTlaMIGtMQswCQYDVQQGEwJERTEMMAoGA1UE
CBMDTlJXMQ4wDAYDVQQHEwVFc3NlbjEcMBoGA1UEChMTVW5pdmVyc2l0eSBvZiBF
c3NlbjEMMAoGA1UECxMDU1dUMSMwIQYDVQQDExp0cDYwMGUud2ktaW5mLnVuaS1l
c3Nlbi5kZTEvMC0GCSqGSIb3DQEJARYgZHJpZGlAdHA2MDBlLndpLWluZi51bmkt
ZXNzZW4uZGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANWD4d0DhEArJhFr
EpFJ0DDuZCl6mFmyUh/9lHs57dEpmPG7tKM9gbnoZJzzLqGJoq4acOYlwQZdkJdY
21S4AJWw2UWuVVsZIR8BtdvPofh5ppfZ3Y8rOuM5z//z7l6ZoVlF6VVNhjixY0tw
K5ZXYUiHAwkxuViJ5czqIRCDhfN1AgMBAAGjZzBlMB8GA1UdIwQYMBaAFNK44y2i
WiJ4OjjxH/V8rY2mxEEPMDQGA1UdJQQtMCsGCCsGAQUFBwMBBggrBgEFBQcDAgYK
KwYBBAGCNwoDAwYJYIZIAYb4QgQBMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEE
BQADgYEAOLWhHJPEqm4/1uoRf3srEdt7IrPSqLPzIGRqJbT+DawSSaBube/7maJ8
vFCw60LvCjL6qWngERCbAAUVl1ms3F/yzYEoPuaWhvTXmXFSw8oPSkjYZrDa6NFF
hMQSskPsY7Yl6ApaTPvi7AM2b835KlxSugIpkvW/xJb/nu2jzwI=
-----END CERTIFICATE-----
./xotcl-1.6.8/apps/actiweb/univ/._UNIVERSAL.css 000644 000765 000024 00000000430 12161600406 021452 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/univ/UNIVERSAL.css 000644 000765 000024 00000001225 12161600406 021240 0 ustar 00neumann staff 000000 000000 A {color: yellow; }
A:selected {color: red; }
A:visited {color: #6699FF; }
BODY {background-color: #000066; color: #FFFFFF; margin-left: 10; shading: no;}
B.outer { background-color: #000066; color: #FFFFFF; }
B.inner,TD { background-color: #110088; color: #FFFFFF; }
H1,H2 {font-family:Helvetica,sans-serif; text-align:center; }
H3 {font-family:Helvetica,sans-serif; color: #FFFFFF;}
HR {align:center; shading:no;}
LI,UL,OL {font-family:Helvetica,sans-serif; }
TABLE {shading: no; border-style: solid; border-color: solid red; background-color: #110088;}
TH {font-family:Helvetica,sans-serif;}
DT {font-family:Helvetica,sans-serif; font-weight:bold;}
./xotcl-1.6.8/apps/actiweb/univ/._UNIVERSAL.jpg 000644 000765 000024 00000000430 12161600406 021442 0 ustar 00neumann staff 000000 000000 Mac OS X 2 æ ATTR ˜ € ˜ € com.apple.acl.text !#acl 1
user:FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000059:_spotlight:89:allow,inherited:read,execute,readattr,readextattr,readsecurity
./xotcl-1.6.8/apps/actiweb/univ/UNIVERSAL.jpg 000644 000765 000024 00000004704 12161600406 021235 0 ustar 00neumann staff 000000 000000 ÿØÿà JFIF H H ÿÛ C
(1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcÿÛ C//cB8BccccccccccccccccccccccccccccccccccccccccccccccccccÿÀ e ¾" ÿÄ
ÿÄ µ } !1AQa"q2‘¡#B±ÁRÑð$3br‚
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ
ÿÄ µ w !1AQaq"2B‘¡±Á #3RðbrÑ
$4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ? 㨋:Þ/Yê
Ï–fF9ã=¿
ѱЬ§‹BgWÍëH%ÃuÛœcÒ»’0±ËQ]wü"ÐC⸬¥ö3«€‘Tš`ÕŠØ£ìT‰äÞ]Pgvyÿ 9§aâŒU…·ÁVh‰' dÿ …CŠ n(Å;b€n(Å;b‹ ÜQŠv(Ÿ£ìQŠ,Kh°jÞ‡NKË{{«iËíö‡Sž‡ñý+B+»;+íÄÞA!³óÒ«ŠH