Commit 9a61ba31 authored by Rinus Plasmeijer's avatar Rinus Plasmeijer
Browse files

*** empty log message ***

parent ad7823f2
...@@ -174,7 +174,9 @@ DecodeArguments Internal (Just args) ...@@ -174,7 +174,9 @@ DecodeArguments Internal (Just args)
# nconstriplets = [(constrip,"") \\ (_,codedtrip) <- constriplets, (Just constrip) <- [parseString (decodeString (urlDecode codedtrip))]] // and decode # nconstriplets = [(constrip,"") \\ (_,codedtrip) <- constriplets, (Just constrip) <- [parseString (decodeString (urlDecode codedtrip))]] // and decode
# valtriplets = filter (\(name,_) -> name <> "CS") tripargs // select all other triplets # valtriplets = filter (\(name,_) -> name <> "CS") tripargs // select all other triplets
# nvaltriplets = [(mytrip,new) \\ (codedtrip,new) <- valtriplets, (Just mytrip) <- [parseString (decodeString (urlDecode codedtrip))]] // and decode # nvaltriplets = [(mytrip,new) \\ (codedtrip,new) <- valtriplets, (Just mytrip) <- [parseString (decodeString (urlDecode codedtrip))]] // and decode
//# alltriplets = ordertriplets (nconstriplets ++ nvaltriplets) []
= ("clean",reverse nconstriplets ++ nvaltriplets,state) // order is important, first the structure than the values ... = ("clean",reverse nconstriplets ++ nvaltriplets,state) // order is important, first the structure than the values ...
//= ("clean",alltriplets,state) // order is important, first the structure than the values ...
where where
DecodeCleanServerArguments :: !String -> (!String,!Triplets,!String) // executable, id + update , new , state DecodeCleanServerArguments :: !String -> (!String,!Triplets,!String) // executable, id + update , new , state
DecodeCleanServerArguments args DecodeCleanServerArguments args
...@@ -182,7 +184,11 @@ where ...@@ -182,7 +184,11 @@ where
# (thisexe,input) = mscan '\"' input // get rid of garbage # (thisexe,input) = mscan '\"' input // get rid of garbage
# input = skipping ['UD\"'] input # input = skipping ['UD\"'] input
# (triplet, input) = mscan '=' input // should give triplet # (triplet, input) = mscan '=' input // should give triplet
# (new, input) = mscan '-' input // should give triplet value <<< *** Bug for negative integers??? *** // # (new, input) = mscan '-' input // should give triplet value <<< *** Bug for negative integers??? ***
# (found,index) = FindSubstr ['--'] input
# (new, input) = splitAt index input // should give triplet value
# (_,input) = mscan '=' input # (_,input) = mscan '=' input
# input = skipping ['\"GS\"'] input # input = skipping ['\"GS\"'] input
# (found,index) = FindSubstr ['---'] input # (found,index) = FindSubstr ['---'] input
...@@ -192,6 +198,16 @@ where ...@@ -192,6 +198,16 @@ where
"CS" = ("clean", [(fromJust (parseString (decodeChars new)), "")], toString state) "CS" = ("clean", [(fromJust (parseString (decodeChars new)), "")], toString state)
else = ("clean", [(fromJust (parseString (decodeChars triplet)) , toString new)], toString state) else = ("clean", [(fromJust (parseString (decodeChars triplet)) , toString new)], toString state)
ordertriplets [] accu = accu
ordertriplets [x=:((id,_,_),_):xs] accu
# (thisgroup,other) = ([x:filter (\((tid,_,_),_) -> tid == id) xs],filter (\((tid,_,_),_) -> tid <> id) xs)
= ordertriplets other (qsort thisgroup ++ accu)
qsort [] = []
qsort [x=:((_,posx,_),_):xs ] = [y \\ y=:((_,posy,_),_) <- xs | posy < posx]
++ [x] ++
[y \\ y=:((_,posy,_),_) <- xs | posy > posx]
// traceHtmlInput utility used to see what kind of rubbish is received from client // traceHtmlInput utility used to see what kind of rubbish is received from client
traceHtmlInput :: !ServerKind !(Maybe [(String, String)]) -> BodyTag traceHtmlInput :: !ServerKind !(Maybe [(String, String)]) -> BodyTag
......
...@@ -9,7 +9,7 @@ derive gUpd [] ...@@ -9,7 +9,7 @@ derive gUpd []
//Start world = doHtmlServer (multiUser twotasks3) world //Start world = doHtmlServer (multiUser twotasks3) world
Start world = doHtmlServer (multiUser twotasks3) world Start world = doHtmlServer (multiUser testEenTwee) world
where where
singleUser tasks hst singleUser tasks hst
# (_,html,hst) = startTask 0 tasks hst # (_,html,hst) = startTask 0 tasks hst
......
...@@ -221,10 +221,10 @@ where ...@@ -221,10 +221,10 @@ where
// The value might have been changed with this editor, so the value returned might differ from the value you started with! // The value might have been changed with this editor, so the value returned might differ from the value you started with!
specialize :: !((InIDataId a) *HSt -> (Form a,*HSt)) !(InIDataId a) !*HSt -> (!Form a,!*HSt) | gUpd {|*|} a specialize :: !((InIDataId a) *HSt -> (Form a,*HSt)) !(InIDataId a) !*HSt -> (!Form a,!*HSt) | gUpd {|*|} a
specialize editor (init,formid) hst=:{cntr = inidx,states = formStates,world,submits} specialize editor (init,formid) hst=:{cntr = inidx,states = formStates,world}
# nextidx = incrIndex inidx formid.ival // this value will be repesented differently, so increment counter # nextidx = incrIndex inidx formid.ival // this value will be repesented differently, so increment counter
# (nv,hst) = editor (init,nformid) {setCntr 0 hst & submits = True} # (nv,hst) = editor (init,nformid) (setCntr 0 hst)
= (nv,{setCntr nextidx hst & submits = submits}) = (nv,setCntr nextidx hst)
where where
nformid = {formid & id = formid.id <+++ "_specialize_" <+++ inidx <+++ "_"} nformid = {formid & id = formid.id <+++ "_specialize_" <+++ inidx <+++ "_"}
......
...@@ -19,7 +19,7 @@ class iDataSerAndDeSerialize a ...@@ -19,7 +19,7 @@ class iDataSerAndDeSerialize a
, iDataSerialize a , iDataSerialize a
TraceInput :== True // show what kind of information is received from Client TraceInput :== True // show what kind of information is received from Client
TraceOutput :== True // show what kind of information is stored TraceOutput :== False // show what kind of information is stored
MyDataBase :== "iDataDatabase" // name of database being used by iData applications MyDataBase :== "iDataDatabase" // name of database being used by iData applications
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment