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
727d9a79
Commit
727d9a79
authored
Oct 18, 2006
by
Peter Achten
Browse files
made signature of universalDB more consistent with universalRefEditor
parent
f7519628
Changes
5
Hide whitespace changes
Inline
Side-by-side
libraries/htmlGEC/Examples/Conf Management System/confIData.icl
View file @
727d9a79
...
...
@@ -11,8 +11,7 @@ import StdListExtensions
AccountsDB
::
!
Init
!
ConfAccounts
*
HSt
->
(
ConfAccounts
,!*
HSt
)
// conf management database
AccountsDB
init
accounts
hst
#
accounts
=
setInvariantAccounts
accounts
// ensure that all links are correct
=
universalDB
init
(\
s
a
->
invariantLogAccounts
s
a
+
invariantConfAccounts
s
a
)
uniqueDBname
accounts
hst
=
universalDB
(
init
,
accounts
,
uniqueDBname
)
(\
s
a
->
invariantLogAccounts
s
a
+
invariantConfAccounts
s
a
)
hst
PaperNrStore
::
!(
Int
->
Int
)
*
HSt
->
(
Int
,!*
HSt
)
// paper counter
PaperNrStore
fun
hst
...
...
libraries/htmlGEC/Examples/Conf Management System/stateHandlingIData.icl
View file @
727d9a79
...
...
@@ -187,12 +187,12 @@ discussPapersPage account accounts hst
#
selectedpaper
=
allpapernrs
!!
selected
#
mbpaperrefinfo
=
getPaperInfo
selectedpaper
accounts
#
(
RefDiscussion
(
Ref2
name
))
=
(
fromJust
mbpaperrefinfo
).
discussion
#
(
disclist
,
hst
)
=
universalDB
Init
(\_
_
->
Ok
)
name
(
Discussion
[]
)
hst
#
(
disclist
,
hst
)
=
universalDB
(
Init
,
Discussion
[])
name
(\_
_
->
Ok
)
hst
#
(
time
,
date
,
hst
)
=
getTimeAndDate
hst
#
(
newsubmit
,
newdiscf
,
hst
)
=
mkSubStateForm
(
if
pdfun
.
changed
Set
Init
,
nFormId
"sh_dpp_adddisc"
(
TS
80
""
))
disclist
(\
s
->
addItemTextInput
(
account
.
login
.
loginName
)
time
date
(
toS
s
))
hst
#
(_,
hst
)
=
if
newsubmit
(
universalDB
Set
(\_
_
->
Ok
)
name
newdiscf
.
value
hst
)
(
undef
,
hst
)
#
(_,
hst
)
=
if
newsubmit
(
universalDB
(
Set
,
newdiscf
.
value
)
name
(\_
_
->
Ok
)
hst
)
(
undef
,
hst
)
#
(
disclistf
,
hst
)
=
mkEditForm
(
Set
,
sdFormId
"sh_show_disc"
newdiscf
.
value
)
hst
#
(
newsubmit
,
newdiscf
,
hst
)
=
if
newsubmit
(
mkSubStateForm
(
Set
,
nFormId
"sh_dpp_adddisc"
(
TS
80
""
))
disclist
...
...
libraries/htmlGEC/htmlButtons.dcl
View file @
727d9a79
...
...
@@ -50,7 +50,3 @@ instance == PasswordBox
::
HtmlTime
=
Time
Int
Int
Int
// Hours Minutes Seconds
getTimeAndDate
::
!*
HSt
->
*(!
HtmlTime
,!
HtmlDate
,!*
HSt
)
libraries/htmlGEC/htmlRefFormlib.dcl
View file @
727d9a79
...
...
@@ -14,7 +14,7 @@ invokeRefEditor :: (!(InIDataId b) !*HSt -> (Form d,!*HSt)) (InIDataId b) !*HSt
universalRefEditor
::
!(
InIDataId
(
Ref2
a
))
!(
a
->
Judgement
)
!*
HSt
->
(
Form
a
,!*
HSt
)
|
iData
,
TC
a
universalDB
::
!
Init
!(
String
a
->
Judgement
)
!
String
!
a
!*
HSt
->
(
a
,!*
HSt
)
|
iData
,
TC
a
universalDB
::
!(
!
Init
,!
a
)
!
String
!(
String
a
->
Judgement
)
!*
HSt
->
(
a
,!*
HSt
)
|
iData
,
TC
a
// Usefull for exception handling
...
...
libraries/htmlGEC/htmlRefFormlib.icl
View file @
727d9a79
...
...
@@ -72,8 +72,8 @@ where
// editor for persistent information
universalDB
::
!
Init
!(
String
a
->
Judgement
)
!
String
!
a
!*
HSt
->
(
a
,!*
HSt
)
|
iData
,
TC
a
universalDB
init
invariant
filename
value
hst
universalDB
::
!(
!
Init
,!
a
)
!
String
!(
String
a
->
Judgement
)
!*
HSt
->
(
a
,!*
HSt
)
|
iData
,
TC
a
universalDB
(
init
,
value
)
filename
invariant
hst
#
(
dbf
,
hst
)
=
myDatabase
Init
0
value
hst
// create / read out database file
#
dbversion
=
fst
dbf
.
value
// version number stored in database
#
dbvalue
=
snd
dbf
.
value
// value stored in database
...
...
Write
Preview
Markdown
is supported
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