Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-libraries
Commits
a13f30f7
Commit
a13f30f7
authored
Dec 29, 2006
by
Rinus Plasmeijer
Browse files
*** empty log message ***
parent
4793cd36
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
libraries/htmlGEC/Examples/Simple Examples/balanceTree.prj
View file @
a13f30f7
This diff is collapsed.
Click to expand it.
libraries/htmlGEC/Examples/Simple Workflows/sum.icl
View file @
a13f30f7
...
@@ -4,24 +4,50 @@ import StdEnv, StdHtml
...
@@ -4,24 +4,50 @@ import StdEnv, StdHtml
// choose one of the following variants
// choose one of the following variants
Start
world
=
doHtmlServer
(
singleUserTask
count
)
world
//Start world = doHtmlServer (singleUserTask count) world
// Start world = doHtmlServer (multiUserTask 3 [] countMU) world
Start
world
=
doHtmlServer
(
multiUserTask
3
[]
countMU
)
world
// Start world = doHtmlServer (multiUserTask 3 [setTaskAttribute Persistent] countMU) world
//Start world = doHtmlServer (multiUserTask 3 [setTaskAttribute Persistent] countMU) world
//Start world = doHtmlServer countIData world
// Change the type to any type one can apply addition to
initVal
::
Int
initVal
=
createDefault
// single user: give first value, then give second, then show sum
count
tst
count
tst
#
(
v1
,
tst
)
=
STask
"Set"
initVal
tst
#
(
v1
,
tst
)
=
STask
"Set"
initVal
tst
#
(
v2
,
tst
)
=
STask
"Set"
initVal
tst
#
(
v2
,
tst
)
=
STask
"Set"
initVal
tst
#
tst
=
returnF
[
Hr
[]]
tst
#
tst
=
returnF
[
Txt
"+"
,
Hr
[]]
tst
=
returnTask
(
v1
+
v2
)
tst
=
returnTask
(
v1
+
v2
)
tst
// multi user varian
countMU
tst
countMU
tst
#
(
v1
,
tst
)
=
((
1
,
"number"
)
@:
STask
"Set"
initVal
)
tst
// user 1
#
(
v1
,
tst
)
=
((
1
,
"number"
)
@:
STask
"Set"
initVal
)
tst
// user 1
#
(
v2
,
tst
)
=
((
2
,
"number"
)
@:
STask
"Set"
initVal
)
tst
// user 2
#
(
v2
,
tst
)
=
((
2
,
"number"
)
@:
STask
"Set"
initVal
)
tst
// user 2
#
tst
=
returnF
[
Hr
[]]
tst
// user 0
#
tst
=
returnF
[
Txt
"+"
,
Hr
[]]
tst
// user 0
=
returnTask
(
v1
+
v2
)
tst
// user 0
=
returnTask
(
v1
+
v2
)
tst
// user 0
// Change the type to any type one can apply addition to
// iData variant to show what iTasks do automatically for you
initVal
::
Int
countIData
hst
initVal
=
createDefault
#
((
d1
,
v1
),
t1
,
hst
)
=
myEdit
"v1"
0
hst
#
((
d2
,
v2
),
t2
,
hst
)
=
myEdit
"v2"
0
hst
=
mkHtml
"Solution using iData without iTasks"
[
t1
,
if
d1
t2
EmptyBody
,
if
d2
(
BodyTag
[
Txt
"+"
,
Hr
[],
toHtml
(
v1
+
v2
)])
EmptyBody
]
hst
where
myEdit
name
val
hst
#
(
idata
,
hst
)
=
mkEditForm
(
Init
,
nFormId
name
(
HideMode
False
,
val
)
<@
Submit
)
hst
#
nval
=
snd
idata
.
value
#
done
=
idata
.
changed
||
fst
idata
.
value
==
HideMode
True
|
done
#
(
idata
,
hst
)
=
mkEditForm
(
Set
,
nFormId
name
(
HideMode
done
,
nval
)
<@
Display
)
hst
=
((
True
,
nval
),
BodyTag
idata
.
form
,
hst
)
=
((
False
,
nval
),
BodyTag
idata
.
form
,
hst
)
\ No newline at end of file
libraries/htmlGEC/htmlButtons.dcl
View file @
a13f30f7
...
@@ -17,6 +17,7 @@ instance toInt PullDownMenu // Current index in pull down list
...
@@ -17,6 +17,7 @@ instance toInt PullDownMenu // Current index in pull down list
instance
toString
PullDownMenu
// Corresponding element in pull down list
instance
toString
PullDownMenu
// Corresponding element in pull down list
derive
gEq
HtmlDate
,
HtmlTime
,
PasswordBox
derive
gEq
HtmlDate
,
HtmlTime
,
PasswordBox
instance
==
HtmlDate
,
HtmlTime
,
PasswordBox
instance
==
HtmlDate
,
HtmlTime
,
PasswordBox
instance
==
(
DisplayMode
a
)
|
==
a
derive
gLexOrd
HtmlDate
,
HtmlTime
derive
gLexOrd
HtmlDate
,
HtmlTime
instance
<
HtmlDate
,
HtmlTime
instance
<
HtmlDate
,
HtmlTime
instance
toString
HtmlDate
,
HtmlTime
instance
toString
HtmlDate
,
HtmlTime
...
...
libraries/htmlGEC/htmlButtons.icl
View file @
a13f30f7
...
@@ -386,6 +386,14 @@ instance == PasswordBox where (==) pb1 pb2 = pb1 === pb2
...
@@ -386,6 +386,14 @@ instance == PasswordBox where (==) pb1 pb2 = pb1 === pb2
instance
==
HtmlTime
where
(==)
ht1
ht2
=
ht1
===
ht2
instance
==
HtmlTime
where
(==)
ht1
ht2
=
ht1
===
ht2
instance
==
HtmlDate
where
(==)
hd1
hd2
=
hd1
===
hd2
instance
==
HtmlDate
where
(==)
hd1
hd2
=
hd1
===
hd2
instance
==
(
DisplayMode
a
)
|
==
a
where
(==)
(
DisplayMode
a
)
(
DisplayMode
b
)
=
a
==
b
(==)
(
EditMode
a
)
(
EditMode
b
)
=
a
==
b
(==)
(
HideMode
a
)
(
HideMode
b
)
=
a
==
b
(==)
EmptyMode
EmptyMode
=
True
(==)
_
_
=
False
derive
gLexOrd
HtmlTime
,
HtmlDate
derive
gLexOrd
HtmlTime
,
HtmlDate
instance
<
HtmlTime
where
(<)
ht1
ht2
=
gEq
{|*|}
(
gLexOrd
{|*|}
ht1
ht2
)
LT
instance
<
HtmlTime
where
(<)
ht1
ht2
=
gEq
{|*|}
(
gLexOrd
{|*|}
ht1
ht2
)
LT
instance
<
HtmlDate
where
(<)
hd1
hd2
=
gEq
{|*|}
(
gLexOrd
{|*|}
hd1
hd2
)
LT
instance
<
HtmlDate
where
(<)
hd1
hd2
=
gEq
{|*|}
(
gLexOrd
{|*|}
hd1
hd2
)
LT
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment