...
 
Commits (1006)
**/Clean System Files
*-data
*-sapl
*-www
*.abc
*.bc
*.o
*.tcl
*.prj
*.prp
*.pbc
*.exe
*-data
*-www
.sass-cache
BasicAPIExamples.icl
.ctest-results.json
*-junit.xml
*.bak
BasicAPIExamples.icl
Examples/BasicAPIExamples/EditorsOnBasicAndPredefinedTypes/EnterDateAndTime
Examples/BasicAPIExamples/EditorsOnBasicAndPredefinedTypes/EnterInteger
Examples/BasicAPIExamples/EditorsOnBasicAndPredefinedTypes/EnterListOfInt
Examples/BasicAPIExamples/EditorsOnBasicAndPredefinedTypes/EnterText
Examples/BasicAPIExamples/EditorsOnBasicAndPredefinedTypes/HelloWorld
Examples/BasicAPIExamples/EditorsOnBasicAndPredefinedTypes/Leaflet
Examples/BasicAPIExamples/EditorsOnCustomTypes/EnterFamilyTree
Examples/BasicAPIExamples/EditorsOnCustomTypes/EnterPerson
Examples/BasicAPIExamples/InteractionUsingShares/BrowseAndViewLeafletMap
Examples/BasicAPIExamples/InteractionUsingShares/CurrentDateAndTime
Examples/BasicAPIExamples/InteractionUsingShares/SharedNoteAsList
Examples/BasicAPIExamples/InteractionUsingShares/SharedNotes
Examples/BasicAPIExamples/InteractionUsingShares/UpdateSharedPersonsAndView
Examples/BasicAPIExamples/InteractionWithTheSystem/RunProcess
Examples/BasicAPIExamples/MultiUserExamples/Chat
Examples/BasicAPIExamples/MultiUserExamples/MeetingDate
Examples/BasicAPIExamples/MultiUserExamples/OptionsChat
Examples/BasicAPIExamples/SequentialExamples/CalculateSumInShare
Examples/BasicAPIExamples/SequentialExamples/CalculateSumStepwise
Examples/BasicAPIExamples/SequentialExamples/CalculateSumStepwiseAndBack
Examples/BasicAPIExamples/SequentialExamples/Calculator
Examples/BasicAPIExamples/SequentialExamples/CoffeeMachine
Examples/BasicAPIExamples/SequentialExamples/EditPerson1by1
Examples/BasicAPIExamples/SequentialExamples/Palindrome
Examples/DynamicEditor/TypedTaskEditor
Examples/GIS/LeafletMapExample
Examples/WasmTest
Tests/Interactive/GenericEditors/TestADTMultiCons
Tests/Interactive/GenericEditors/TestADTSingleConsMany
Tests/Interactive/GenericEditors/TestADTSingleConsMulti
Tests/Interactive/GenericEditors/TestADTSingleConsOne
Tests/Interactive/GenericEditors/TestBool
Tests/Interactive/GenericEditors/TestChar
Tests/Interactive/GenericEditors/TestCustomList
Tests/Interactive/GenericEditors/TestInt
Tests/Interactive/GenericEditors/TestIntList
Tests/Interactive/GenericEditors/TestNestedRecord
Tests/Interactive/GenericEditors/TestOptionalRecord
Tests/Interactive/GenericEditors/TestReal
Tests/Interactive/GenericEditors/TestRecordWithADT
Tests/Interactive/GenericEditors/TestSingleRecord
Tests/Interactive/GenericEditors/TestString
Tests/TestAsyncTask
Tests/Unit/iTasks.Extensions.Process.UnitTests
Tests/Unit/iTasks.Internal.IWorld.UnitTests
Tests/Unit/iTasks.Internal.TaskStore.UnitTests
Tests/Unit/iTasks.UI.Editor.Generic.UnitTests
Tests/Unit/iTasks.UI.Layout.UnitTests
Tests/Unit/iTasks.WF.Combinators.Common.UnitTests
Tests/Unit/iTasks.WF.Combinators.Core.UnitTests
Tests/Unit/iTasks.WF.Tasks.Core.UnitTests
Tests/Unit/iTasks.WF.Tasks.IO.UnitTests
Tools/CodeQualityMonitor
Tools/WebResourceCollector
test:
before_script:
- install_clean.sh bundle-complete && install_clean_nightly.sh test && apt-get update -qq && apt-get install -y -qq build-essential libsqlite3-dev libmariadbclient-dev-compat
image: "camilstaps/clean:nightly"
script:
- bash ci-tests.bash
linux-x64:
image: "camilstaps/clean:nightly"
before_script:
- install_clean.sh bundle-complete
- apt-get update -qq
- apt-get install -y -qq build-essential libsqlite3-dev libmariadbclient-dev-compat
script:
- bash Tests/posix.sh
artifacts:
when: always
paths:
- Tests/Unit/*-junit.xml
reports:
junit: Tests/Unit/*-junit.xml
linux-x86:
only:
- master
image: "camilstaps/clean:nightly"
before_script:
- CLEAN_PLATFORM=x86 install_clean.sh bundle-complete
- apt-get update -qq
- apt-get install -y -qq build-essential libsqlite3-dev:i386 libmariadbclient-dev-compat:i386
- sed -i 's/x64/x86/g' Tests/posix.sh
script:
- bash Tests/posix.sh
artifacts:
when: always
paths:
- Tests/Unit/*-junit.xml
reports:
junit: Tests/Unit/*-junit.xml
windows-x64:
only:
- master
tags:
- windows
- x64
before_script:
- wget -UseBasicParsing -o clean.zip https://ftp.cs.ru.nl/Clean/builds/windows-x64/clean-bundle-complete-windows-x64-latest.zip
- 7z x clean.zip
- sed -n -i '/EnvironmentName:\tiTasks/q;p' clean-bundle-complete\Config\IDEEnvs
- $EscapedPwd = $Pwd -replace '\\', '\\\\'
- tail -n +3 Config\windows-x64\iTasks.env | sed "s/\{Application\}.*iTasks/$EscapedPwd\\\\Libraries/" | Out-File -encoding ASCII -Append clean-bundle-complete\Config\IDEEnvs
- $Env:CLEAN_HOME = "$Pwd\\clean-bundle-complete"
- $Env:Path += ";${Env:CLEAN_HOME}"
script:
- bash Tests/windows.sh
artifacts:
when: always
paths:
- Tests/Unit/*-junit.xml
reports:
junit: Tests/Unit/*-junit.xml
Version: 1.5
Global
ProjectRoot: .
Target: iTasks
CodeGen
CheckStacks: False
CheckIndexes: True
OptimiseABC: True
GenerateByteCode: True
Application
HeapSize: 167772160
StackSize: 1048576
ExtraMemory: 81920
IntialHeapSize: 204800
HeapSizeMultiplier: 4096
ShowExecutionTime: False
ShowGC: False
ShowStackSize: False
MarkingCollector: False
DisableRTSFlags: False
StandardRuntimeEnv: True
Profile
Memory: False
MemoryMinimumHeapSize: 0
Time: False
Stack: False
Dynamics: True
GenericFusion: False
DescExL: True
Output
Output: ShowConstructors
Font: Courier
FontSize: 9
WriteStdErr: False
Link
LinkMethod: Static
GenerateRelocations: False
GenerateSymbolTable: True
GenerateLinkMap: False
LinkResources: False
ResourceSource:
GenerateDLL: False
ExportedNames:
StripByteCode: True
KeepByteCodeSymbols: True
PrelinkByteCode: True
Precompile:
Postlink:
Version: 1.0
Environment
EnvironmentName: iTasks-dist
EnvironmentPaths
Path: {Application}/lib/StdEnv
Path: {Application}/lib/Dynamics
Path: {Application}/lib/TCPIP
Path: {Application}/lib/Sapl
Path: {Application}/lib/GraphCopy
Path: {Application}/lib/Platform
Path: {Application}/lib/Platform/Deprecated/Generics
Path: {Application}/lib/Platform/Deprecated/StdLib
Path: {Application}/Development/iTasks-SDK/Libraries
EnvironmentCompiler: lib/exe/cocl::-dynamics -sapl -d
EnvironmentCodeGen: lib/exe/cg
EnvironmentLinker: /usr/bin/gcc::-g|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
EnvironmentDynLink: lib/exe/cclinker
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
EnvironmentProcessor: I386
Environment64BitProcessor: True
\ No newline at end of file
......@@ -9,13 +9,17 @@ Environments
Path: {Application}/lib/Platform
Path: {Application}/lib/Platform/Deprecated/Generics
Path: {Application}/lib/Platform/Deprecated/StdLib
Path: {Application}/lib/Sapl
Path: {Application}/lib/ABCInterpreter
Path: {Application}/lib/GraphCopy
Path: {Application}/Development/iTasks-SDK/Libraries
EnvironmentCompiler: lib/exe/cocl:-dynamics -sapl
EnvironmentCompiler: lib/exe/cocl-itasks:-dynamics
EnvironmentCodeGen: lib/exe/cg
EnvironmentLinker: lib/exe/linker|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
EnvironmentDynLink: lib/exe/linker
EnvironmentLinker: /usr/bin/gcc::-Wl,--gc-sections|lib/exe/itasks-web-collector
EnvironmentABCOptimise: lib/exe/abcopt
EnvironmentByteCodeGen: lib/exe/bcgen
EnvironmentByteCodeLink: lib/exe/bclink
EnvironmentByteCodeStrip: lib/exe/bcstrip
EnvironmentByteCodePrelink: lib/exe/bcprelink
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
......
Version: 1.0
Environments
Environment
EnvironmentName: iTasks Tonic
EnvironmentPaths
Path: {Application}/lib/StdEnv
Path: {Application}/lib/Dynamics
Path: {Application}/lib/TCPIP
Path: {Application}/lib/Platform
Path: {Application}/lib/Platform/Deprecated/Generics
Path: {Application}/lib/Platform/Deprecated/StdLib
Path: {Application}/lib/Sapl
Path: {Application}/lib/GraphCopy
Path: {Application}/lib/iTasks
EnvironmentCompiler: lib/exe/cocl-tonic:-dynamics -sapl -tonic
EnvironmentCodeGen: lib/exe/cg
EnvironmentLinker: lib/exe/linker|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
EnvironmentDynLink: lib/exe/linker
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
EnvironmentProcessor: I386
Environment64BitProcessor: True
......@@ -9,13 +9,18 @@ Environments
Path: {Application}/lib/Platform
Path: {Application}/lib/Platform/Deprecated/Generics
Path: {Application}/lib/Platform/Deprecated/StdLib
Path: {Application}/lib/Sapl
Path: {Application}/lib/ABCInterpreter
Path: {Application}/lib/GraphCopy
Path: {Application}/lib/iTasks
EnvironmentCompiler: lib/exe/cocl::-dynamics -sapl
Path: {Application}/lib/Gast
EnvironmentCompiler: lib/exe/cocl-itasks::-dynamics
EnvironmentCodeGen: lib/exe/cg
EnvironmentLinker: lib/exe/linker|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
EnvironmentDynLink: lib/exe/linker
EnvironmentLinker: /usr/bin/gcc::-Wl,--gc-sections|:linker:lib/exe/itasks-web-collector
EnvironmentABCOptimise: lib/exe/abcopt
EnvironmentByteCodeGen: lib/exe/bcgen
EnvironmentByteCodeLink: lib/exe/bclink
EnvironmentByteCodeStrip: lib/exe/bcstrip
EnvironmentByteCodePrelink: lib/exe/bcprelink
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
......
Version: 1.0
Environments
Environment
EnvironmentName: iTasks
EnvironmentPaths
......@@ -8,15 +9,19 @@ Version: 1.0
Path: {Application}/lib/Platform
Path: {Application}/lib/Platform/Deprecated/Generics
Path: {Application}/lib/Platform/Deprecated/StdLib
Path: {Application}/lib/Sapl
Path: {Application}/lib/ABCInterpreter
Path: {Application}/lib/GraphCopy
Path: {Application}/lib/iTasks
EnvironmentCompiler: lib/exe/cocl:-dynamics -sapl -desc -exl -d
EnvironmentCompiler: lib/exe/cocl-itasks::-dynamics
EnvironmentCodeGen: lib/exe/cg
EnvironmentLinker: lib/exe/cclinker|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
EnvironmentDynLink: lib/exe/cclinker
EnvironmentLinker: /usr/bin/gcc::-Wl,--gc-sections -m32|:linker:lib/exe/itasks-web-collector
EnvironmentABCOptimise: lib/exe/abcopt
EnvironmentByteCodeGen: lib/exe/bcgen
EnvironmentByteCodeLink: lib/exe/bclink
EnvironmentByteCodeStrip: lib/exe/bcstrip
EnvironmentByteCodePrelink: lib/exe/bcprelink
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
EnvironmentProcessor: I386
Environment64BitProcessor: True
Environment64BitProcessor: False
......@@ -9,13 +9,17 @@ Environments
Path: {Application}/lib/Platform
Path: {Application}/lib/Platform/Deprecated/Generics
Path: {Application}/lib/Platform/Deprecated/StdLib
Path: {Application}/lib/Sapl
Path: {Application}/lib/ABCInterpreter
Path: {Application}/lib/GraphCopy
Path: {Application}/Development/iTasks-SDK/Libraries
EnvironmentCompiler: lib/exe/cocl::-dynamics -sapl
EnvironmentCompiler: lib/exe/cocl-itasks::-dynamics
EnvironmentCodeGen: lib/exe/cg
EnvironmentLinker: /usr/bin/gcc|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
EnvironmentDynLink: /usr/bin/gcc
EnvironmentLinker: /usr/bin/gcc|lib/exe/itasks-web-collector
EnvironmentABCOptimise: lib/exe/abcopt
EnvironmentByteCodeGen: lib/exe/bcgen
EnvironmentByteCodeLink: lib/exe/bclink
EnvironmentByteCodeStrip: lib/exe/bcstrip
EnvironmentByteCodePrelink: lib/exe/bcprelink
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
......
Version: 1.0
Environments
Environment
EnvironmentName: iTasks Tonic
EnvironmentPaths
Path: {Application}/lib/StdEnv
Path: {Application}/lib/Dynamics
Path: {Application}/lib/TCPIP
Path: {Application}/lib/Platform
Path: {Application}/lib/Platform/Deprecated/Generics
Path: {Application}/lib/Platform/Deprecated/StdLib
Path: {Application}/lib/Sapl
Path: {Application}/lib/GraphCopy
Path: {Application}/lib/iTasks
EnvironmentCompiler: lib/exe/cocl-tonic::-dynamics -sapl -tonic
EnvironmentCodeGen: lib/exe/cg
EnvironmentLinker: /usr/bin/gcc|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
EnvironmentDynLink: /usr/bin/gcc
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
EnvironmentProcessor: I386
Environment64BitProcessor: True
......@@ -9,13 +9,17 @@ Environments
Path: {Application}/lib/Platform
Path: {Application}/lib/Platform/Deprecated/Generics
Path: {Application}/lib/Platform/Deprecated/StdLib
Path: {Application}/lib/Sapl
Path: {Application}/lib/ABCInterpreter
Path: {Application}/lib/GraphCopy
Path: {Application}/lib/iTasks
EnvironmentCompiler: lib/exe/cocl::-dynamics -sapl
EnvironmentCompiler: lib/exe/cocl-itasks:-h 400M:-dynamics
EnvironmentCodeGen: lib/exe/cg
EnvironmentLinker: /usr/bin/gcc|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
EnvironmentDynLink: /usr/bin/gcc
EnvironmentLinker: :gcc:/usr/bin/gcc|:linker:lib/exe/itasks-web-collector
EnvironmentABCOptimise: lib/exe/abcopt
EnvironmentByteCodeGen: lib/exe/bcgen
EnvironmentByteCodeLink: lib/exe/bclink
EnvironmentByteCodeStrip: lib/exe/bcstrip
EnvironmentByteCodePrelink: lib/exe/bcprelink
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
......
......@@ -13,13 +13,18 @@ Environments
Path: {Application}\Libraries\Platform
Path: {Application}\Libraries\Platform\Deprecated\Generics
Path: {Application}\Libraries\Platform\Deprecated\StdLib
Path: {Application}\Libraries\Sapl
Path: {Application}\Libraries\ABCInterpreter
Path: {Application}\Libraries\GraphCopy
Path: {Application}\Libraries\iTasks
EnvironmentCompiler: Tools\Clean System 64\CleanCompiler64.exe : -h 128M : -sapl -dynamics
EnvironmentCompiler: Tools\Clean System 64\CleanCompilerITasks64.exe : -h 256M : -dynamics
EnvironmentCodeGen: Tools\Clean System 64\CodeGenerator64.exe
EnvironmentLinker: Tools\Clean System 64\StaticLinker.exe : -h 64M | Tools\Clean System\SaplCollectorLinker.exe | Tools\Clean System\WebResourceCollector.exe
EnvironmentLinker: Tools\Clean System 64\StaticLinker.exe : -h 64M | Tools\Clean System\WebResourceCollector.exe
EnvironmentDynLink: Tools\Clean System 64\DynamicLinker.exe
EnvironmentABCOptimise: Tools\Clean System 64\ABCOptimiser.exe
EnvironmentByteCodeGen: Tools\Clean System 64\ByteCodeGenerator.exe
EnvironmentByteCodeLink: Tools\Clean System 64\ByteCodeLinker.exe
EnvironmentByteCodeStrip: Tools\Clean System 64\ByteCodeStripper.exe
EnvironmentByteCodePrelink: Tools\Clean System 64\ByteCodePrelinker.exe
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
......
Version: 1.0
Environments
Environment
EnvironmentName: iTasks-dist
EnvironmentPaths
Path: {Application}\Libraries\StdEnv
Path: {Application}\Libraries\Dynamics
Path: {Application}\Libraries\Dynamics\extension
Path: {Application}\Libraries\Dynamics\general
Path: {Application}\Libraries\Dynamics\implementation
Path: {Application}\Libraries\Dynamics\implementation\windows
Path: {Application}\Libraries\TCPIP
Path: {Application}\Libraries\Platform
Path: {Application}\Libraries\Platform\Deprecated\Generics
Path: {Application}\Libraries\Platform\Deprecated\StdLib
Path: {Application}\Libraries\Sapl
Path: {Application}\Libraries\GraphCopy
Path: {Application}\Development\iTasks-SDK\Libraries
EnvironmentCompiler: Tools\Clean System\CleanCompiler.exe : -h 64M : -sapl -dynamics -generics -desc -exl -d
EnvironmentCodeGen: Tools\Clean System\CodeGenerator.exe
EnvironmentLinker: Tools\Clean System\StaticLinker.exe : -h 64M | Tools\Clean System\SaplCollectorLinker.exe | Tools\Clean System\WebResourceCollector.exe
EnvironmentDynLink: Tools\Clean System\DynamicLinker.exe
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
EnvironmentProcessor: I386
Environment64BitProcessor: False
Version: 1.0
Environments
Environment
EnvironmentName: iTasks git
EnvironmentPaths
Path: {Application}\Libraries\StdEnv
Path: {Application}\Libraries\Dynamics
Path: {Application}\Libraries\Dynamics\extension
Path: {Application}\Libraries\Dynamics\general
Path: {Application}\Libraries\Dynamics\implementation
Path: {Application}\Libraries\Dynamics\implementation\windows
Path: {Application}\Libraries\TCPIP
Path: {Application}\Libraries\Platform
Path: {Application}\Libraries\Platform\Deprecated\Generics
Path: {Application}\Libraries\Platform\Deprecated\StdLib
Path: {Application}\Libraries\Sapl
Path: {Application}\Libraries\GraphCopy
Path: {Application}\Development\iTasks-SDK\Libraries
EnvironmentCompiler: Tools\Clean System\CleanCompiler.exe : -h 64M : -sapl -dynamics -generics
EnvironmentCodeGen: Tools\Clean System\CodeGenerator.exe
EnvironmentLinker: Tools\Clean System\StaticLinker.exe : -h 64M | Tools\Clean System\SaplCollectorLinker.exe | Tools\Clean System\WebResourceCollector.exe
EnvironmentDynLink: Tools\Clean System\DynamicLinker.exe
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
EnvironmentProcessor: I386
Environment64BitProcessor: False
Version: 1.0
Environments
Environment
EnvironmentName: iTasks Tonic
EnvironmentPaths
Path: {Application}\Libraries\StdEnv
Path: {Application}\Libraries\Dynamics
Path: {Application}\Libraries\Dynamics\extension
Path: {Application}\Libraries\Dynamics\general
Path: {Application}\Libraries\Dynamics\implementation
Path: {Application}\Libraries\Dynamics\implementation\windows
Path: {Application}\Libraries\TCPIP
Path: {Application}\Libraries\Platform
Path: {Application}\Libraries\Platform\Deprecated\Generics
Path: {Application}\Libraries\Platform\Deprecated\StdLib
Path: {Application}\Libraries\Sapl
Path: {Application}\Libraries\GraphCopy
Path: {Application}\Libraries\iTasks
EnvironmentCompiler: Tools\Clean System\CleanCompilerTonic.exe : -h 128M : -sapl -dynamics -generics -tonic
EnvironmentCodeGen: Tools\Clean System\CodeGenerator.exe
EnvironmentLinker: Tools\Clean System\StaticLinker.exe : -h 64M | Tools\Clean System\SaplCollectorLinker.exe | Tools\Clean System\WebResourceCollector.exe
EnvironmentDynLink: Tools\Clean System\DynamicLinker.exe
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
EnvironmentProcessor: I386
Environment64BitProcessor: False
Version: 1.0
Environments
Environment
EnvironmentName: iTasks
EnvironmentPaths
Path: {Application}\Libraries\StdEnv
Path: {Application}\Libraries\Dynamics
Path: {Application}\Libraries\Dynamics\extension
Path: {Application}\Libraries\Dynamics\general
Path: {Application}\Libraries\Dynamics\implementation
Path: {Application}\Libraries\Dynamics\implementation\windows
Path: {Application}\Libraries\TCPIP
Path: {Application}\Libraries\Platform
Path: {Application}\Libraries\Platform\Deprecated\Generics
Path: {Application}\Libraries\Platform\Deprecated\StdLib
Path: {Application}\Libraries\Sapl
Path: {Application}\Libraries\GraphCopy
Path: {Application}\Libraries\iTasks
EnvironmentCompiler: Tools\Clean System\CleanCompiler.exe : -h 64M : -sapl -dynamics
EnvironmentCodeGen: Tools\Clean System\CodeGenerator.exe
EnvironmentLinker: Tools\Clean System\StaticLinker.exe : -h 64M | Tools\Clean System\SaplCollectorLinker.exe | Tools\Clean System\WebResourceCollector.exe
EnvironmentDynLink: Tools\Clean System\DynamicLinker.exe
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
EnvironmentProcessor: I386
Environment64BitProcessor: False
# Building an iTask project #
iTask programs are just regular Clean programs that happen to use the iTask framework. Compiling an iTask program does require some specific project configuration settings though. Luckily you can easily get started by using a project template.
In this guide we'll walk you through the steps to build your first iTask project. We assume you have already installed Clean and the iTask framework.
## Building on Windows ##
On windows, you can use the Clean IDE to build your iTask programs.
### Step 1: Creating a main module ###
Open the Clean IDE and use `File -> New File` from the main menu to create a new file called `myprogram.icl`.
Write the following code in the new file (the yellow window).
```Clean
module myprogram
import iTasks
Start world = doTasks (Title "Hello" @>> viewInformation [] "Hello, world") world
```
Save the file using `File -> Save myprogram.icl` from the main menu.
### Step 2: Creating a project file ###
You now need to create a project file. A project file contains all search paths and compilation settings for building a Clean program.
The iTask framework provides a template with default settings for an iTask project. You can create your own project file using this template by choosing `File -> New Project Using Template...` from the main menu.
You are then asked to select a project template (.prt) file. You can find the `iTasks.prt` template file in the `Config` subdirectory of your Clean system.
After selecting the template file you are asked to choose a name for the project file. By default it will be `myprogram.prj` (for the module `myprogram.icl`) which you don't have to change.
### Step 3: Building and running your project ###
You can build and run your program by choosing `Project -> Update and Run` from the main menu. After compilation is completed you should see a console window displaying an URL that you can open in your web browser.
## Building on Linux or Mac ##
On Linux and macOS you can use a command line tool called `cpm` to create and build Clean projects.
### Step 1: Creating a main module ###
First create a Clean source module with a minimal program. Write the following code to a file called `myprogram.icl`.
```Clean
module myprogram
import iTasks
Start world = doTasks (Title "Hello" @>> viewInformation [] "Hello, world") world
```
### Step 2: Creating a project file ###
Using the `cpm` tool we can create a new project file. A project file contains all search paths and compilation settings for building a Clean program.
The iTask framework provides a template with default settings for an iTask project. You can create your own project file using this template with the following command:
```
cpm project myprogram create $CLEAN_HOME/etc/iTasks.prt
```
This will create a file called `myprogram.prj` which is the project file for your program.
### Step3: Building your project ###
To build your program, you can again use `cpm`:
```
cpm myprogram.prj
```
This will create a number of output files in your current directory. The most important one is `myprogram`, the executable program. There will also be additional resources that are needed at runtime: A bytecode version of your program: `myprogram.bc`, a version of that bytecode for the browser: `myprogram.pbc` and a directory with all the public web assets your program needs: `myprogram-www`.
### Step 4: Running your program ###
Simply run the `myprogram` executable and use a web browser to open the URL that is displayed.
```
./myprogram
```
......@@ -44,7 +44,7 @@ So to use a custom task UI we need to do two things: We need to specify an edito
The iTask framework provides a number of builtin UI components that it can render in a browser. These are the lowest level building blocks with which all iTasks GUI's are constructed.
In the example of the previous section we have seen the `slider` editor. This editor is one of the builtin componentens in the `iTasks.UI.Editor.Controls` module. All builtin editors have no arguments, but can dynamically be configured by setting attributes. For example if we wanted to set the maximum value of the slider, we would write `slider <<@ maxAttr 42`. The tuning combinators `<<@` or `@>>` are used to set attributes on editors. This pattern is used to make it easy to create editors without the need to specify all attributes in advance. In many cases, it is not necessary to deviate from the default values of the configurable attributes. Forcing a programmer to specify them all makes our GUI code too verbose. The price we pay for this convenience is that we lose some type safety. We dynamically set arbitrary attributes on editors, whether the UI rendering code uses them or not.
In the example of the previous section we have seen the `slider` editor. This editor is one of the builtin componentens in the `iTasks.UI.Editor.Controls` module. All builtin editors have no arguments, but can dynamically be configured by setting attributes. For example if we wanted to set the maximum value of the slider, we would write `slider <<@ maxAttr 42`. The tuning combinators `<<@` or `@>>` are used to set attributes on editors. This pattern is used to make it easy to create editors without the need to specify all attributes in advance. In many cases, it is not necessary to deviate from the default values of the configurable attributes. Forcing a programmer to specify them all makes our GUI code too verbose. The price we pay for this convenience is that we lose some type safety. We dynamically set arbitrary attributes on editors, whether the UI rendering code uses them or not. Two noteworthy attributes are `classAttr` and `styleAttr` which let you attach CSS classes and inline styles to editors.
## Composing editors ##
......@@ -56,7 +56,7 @@ myTask = updateInformation "Change the magic number"
[UpdateUsing (\x -> ("Mylabel",x)) (\_ (_,x) -> x) editor] 42
where
editor :: Editor (String,Int)