Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-and-itasks
iTasks-SDK
Commits
0f6877bd
Commit
0f6877bd
authored
Apr 05, 2019
by
Bas Lijnse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed code duplication between interactR and interactRW
parent
505da5b3
Pipeline
#20706
failed with stage
in 2 minutes and 58 seconds
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
148 additions
and
200 deletions
+148
-200
Libraries/iTasks/WF/Tasks/Core.dcl
Libraries/iTasks/WF/Tasks/Core.dcl
+6
-5
Libraries/iTasks/WF/Tasks/Core.icl
Libraries/iTasks/WF/Tasks/Core.icl
+142
-195
No files found.
Libraries/iTasks/WF/Tasks/Core.dcl
View file @
0f6877bd
...
...
@@ -85,6 +85,9 @@ instance toString OSException
/**
* Core interaction task. All other interaction tasks are derived from this one.
* There are two almost identical versions:
* The `interactRW` version can update the given sds.
* The `interactR` version only reads, which means it can also be used for sds's that are not writable.
*/
::
InteractionHandlers
l
r
w
v
=
{
onInit
::
!(
r
->
(!
l
,
!
EditMode
v
))
...
...
@@ -92,9 +95,7 @@ instance toString OSException
,
onRefresh
::
!(
r
l
(
Maybe
v
)
->
(!
l
,
!
v
,
!
Maybe
(
r
->
w
)))
}
//Version which does not write shared data
interactR
::
!
d
(
sds
()
r
w
)
(
InteractionHandlers
l
r
w
v
)
(
Editor
v
)
->
Task
(
l
,
v
)
|
toPrompt
d
&
iTask
l
&
iTask
r
&
iTask
v
&
TC
r
&
TC
w
&
Registrable
sds
//Version which writes shared data
//Version which can write shared data
interactRW
::
!
d
!(
sds
()
r
w
)
(
InteractionHandlers
l
r
w
v
)
(
Editor
v
)
->
Task
(
l
,
v
)
|
toPrompt
d
&
iTask
l
&
iTask
r
&
iTask
v
&
TC
r
&
TC
w
&
RWShared
sds
//Version which does not write shared data
interactR
::
!
d
(
sds
()
r
w
)
(
InteractionHandlers
l
r
w
v
)
(
Editor
v
)
->
Task
(
l
,
v
)
|
toPrompt
d
&
iTask
l
&
iTask
r
&
iTask
v
&
TC
r
&
TC
w
&
Registrable
sds
Libraries/iTasks/WF/Tasks/Core.icl
View file @
0f6877bd
This diff is collapsed.
Click to expand it.
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