[q-lang-cvs] qcalc qcalc.q,1.168,1.169 calclib.q,1.40,1.41
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-11-20 18:58:32
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24297 Modified Files: qcalc.q calclib.q Log Message: optimizations, bugfixes Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -d -r1.168 -r1.169 *** qcalc.q 18 Nov 2007 05:49:12 -0000 1.168 --- qcalc.q 20 Nov 2007 18:58:28 -0000 1.169 *************** *** 708,724 **** abort _ _ _ = ABORTED := true; - /* XXXFIXME: A horrible kludge to set the current cell to the one which holds - one of our GUI elements if it gets the focus. Unfortunately, this isn't - handled automatically by Qt. */ - - check_focus N X = set_current_cell (I,J) - if (I,J)<>current_cell - where (I,J) = qt_data X; - // check for a maximum of 5 levels; this should be good enough for most - // purposes - = check_focus (N+1) X - if not is_nil X where X:QtObject = qt_parent X - if N < 5; - /* Queue GUI updates for later processing during evaluations. */ --- 708,711 ---- *************** *** 754,758 **** set_status HAVE_UNDO EDIT_UNDO || set_status HAVE_REDO EDIT_REDO || - check_focus 0 (qt APP "focusWidget" ()) || if not is_recursive then digest_loop --- 741,744 ---- *************** *** 829,832 **** --- 815,836 ---- (reg 1,reg 2), (I,J) = val K; + = dowith process_gui KYs (map gui_elem KYs) || + process_sel2 Xs || merge_undo KXs || digest_loop + where Xs = recursive (map uprocess_update Xs), + Ys = filter (is_qt_object.trd) Xs, + KYs = map (flip (flip sub 0) 1) Ys, + Xs = filter (isstr.trd) Xs, + KXs = map (flip (flip sub 0) 1) Xs + if get STATE = 4 + where [S] = regex "" + "^\\+\\+\\+ Matrix: (.*)$" S (reg 1), + Xs:List = val S; + = process_sel2 [(I,J,IT)] + where [(K,S)] = regex "" + "^\\+\\+\\+ Taskbutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S + (reg 1,reg 2), + (I,J) = val K, (TEXT,INIT) = val S, + IT:QtObject = make_gui taskbutton_gui (I,J) + (TEXT,INIT); = qt X "setIconSet" ICONSET || procmsg (I,J) (Y<>0) where [(K,S)] = regex "" *************** *** 840,843 **** --- 844,849 ---- // process an update of a cell or GUI element triggered by calclib::setval + uprocess_update (I,J,S) + = (I,J,process_update (I,J) S); process_update (I,J) S = gui_setval X S || get CELLS!(I,J) *************** *** 850,859 **** // a variation of the above, used in the evaluation loop (collect_results) process_update2 (I,J) S = gui_setval X S || get CELLS!(I,J) where X:QtObject = gui_elem (I,J); = if null S1 then delete_cells (I,J) || ! cell_setval (I,J) S0 || ! clear_cell (I,J) || set_cell (I,J) S1 || S where (S0,S1) = unquote S, S = if isstr S0 then S else S1; --- 856,866 ---- // a variation of the above, used in the evaluation loop (collect_results) + uprocess_update2 (I,J,S) + = ((I,J),process_update2 (I,J) S); process_update2 (I,J) S = gui_setval X S || get CELLS!(I,J) where X:QtObject = gui_elem (I,J); = if null S1 then delete_cells (I,J) || ! cell_setval (I,J) S0 || S where (S0,S1) = unquote S, S = if isstr S0 then S else S1; *************** *** 1129,1138 **** clear_cell (I,J) ! if (I,J) <> real_index (I,J): ! = _FAIL_; ! where X:QtObject = gui_elem (I,J): = // clean up GUI element in the inferior process ! gui_clear (I,J) || fail; // falls through to below ! otherwise: = qt TABLE "clearCell" (I,J) if not has_table_item (I,J); = cell_setval (I,J) Y --- 1136,1149 ---- clear_cell (I,J) ! if (I,J) = real_index (I,J): = // clean up GUI element in the inferior process ! gui_clear (I,J) || clear_cell1 (I,J) || ! // make sure that edit mode is cleared, too ! if eq current_edited (I,J) then ! qt TABLE "setEditMode" (qt_val "QTable" "NotEditing",I,J) ! where X:QtObject = gui_elem (I,J); ! = clear_cell1 (I,J) otherwise; ! ! clear_cell1 (I,J) = qt TABLE "clearCell" (I,J) if not has_table_item (I,J); = cell_setval (I,J) Y *************** *** 3380,3390 **** collect_results U V ! = begin_recursive || results_loop U V || end_recursive; ! results_loop U [] // we're finished; process any pending cell updates = post MSGS $ zipwith append (keys U) (vals U) if not null U; = () otherwise; ! results_loop U [(I,J)|V] if get ABORTED: // user aborted the computation, flag all remaining cells --- 3391,3401 ---- collect_results U V ! = begin_recursive || results_loop time U V || end_recursive; ! results_loop T0 U [] // we're finished; process any pending cell updates = post MSGS $ zipwith append (keys U) (vals U) if not null U; = () otherwise; ! results_loop T0 U [(I,J)|V] if get ABORTED: // user aborted the computation, flag all remaining cells *************** *** 3396,3408 **** where S:String = try2 MSGS: // evaluation succeeded, we're good ! = update_cell (I,J) S || results_loop (delete U (I,J)) V where [S] = regex "" "^\\+\\+\\+ Result: (.*)$" S (reg 1); // errors during evaluation (these get the red flag) = flag (I,J) || ! results_loop U V if (S = "+++ Syntax error.") or else not null (regex "" "^\\+\\+\\+ Exception: (.*)$" S ()); /* Messages to change a cell (calclib::setval and clearval). */ ! = results_loop (insert U ((I1,J1),X)) [(I,J)|V] where X = process_update2 (I1,J1) S1 where [(K1,S1)] = regex "" --- 3407,3419 ---- where S:String = try2 MSGS: // evaluation succeeded, we're good ! = update_cell (I,J) S || results_loop T0 (delete U (I,J)) V where [S] = regex "" "^\\+\\+\\+ Result: (.*)$" S (reg 1); // errors during evaluation (these get the red flag) = flag (I,J) || ! results_loop T0 U V if (S = "+++ Syntax error.") or else not null (regex "" "^\\+\\+\\+ Exception: (.*)$" S ()); /* Messages to change a cell (calclib::setval and clearval). */ ! = results_loop T0 (insert U ((I1,J1),X)) [(I,J)|V] where X = process_update2 (I1,J1) S1 where [(K1,S1)] = regex "" *************** *** 3410,3414 **** (reg 1,reg 2), (I1,J1) = val K1; ! = results_loop (insert U ((I1,J1),X)) [(I,J)|V] where X = process_clear (I1,J1) S1 where [(K1,S1)] = regex "" --- 3421,3425 ---- (reg 1,reg 2), (I1,J1) = val K1; ! = results_loop T0 (insert U ((I1,J1),X)) [(I,J)|V] where X = process_clear (I1,J1) S1 where [(K1,S1)] = regex "" *************** *** 3416,3421 **** (reg 1,reg 2), (I1,J1) = val K1; /* Messages to create GUI elements in cells (calclib::combobox et al). */ ! = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Checkbox: (\\([0-9]+,[0-9]+\\)) (.*)$" S --- 3427,3437 ---- (reg 1,reg 2), (I1,J1) = val K1; + = results_loop T0 (foldl insert U Xs) [(I,J)|V] + where Xs = map uprocess_update2 Xs + where [S] = regex "" + "^\\+\\+\\+ Matrix: (.*)$" S (reg 1), + Xs:List = val S; /* Messages to create GUI elements in cells (calclib::combobox et al). */ ! = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Checkbox: (\\([0-9]+,[0-9]+\\)) (.*)$" S *************** *** 3423,3427 **** (I1,J1) = val K1, (S1,INIT) = val S1, IT:QtObject = make_gui checkbox_gui (I1,J1) (S1,INIT); ! = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Pushbutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S --- 3439,3443 ---- (I1,J1) = val K1, (S1,INIT) = val S1, IT:QtObject = make_gui checkbox_gui (I1,J1) (S1,INIT); ! = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Pushbutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S *************** *** 3430,3434 **** IT:QtObject = make_gui pushbutton_gui (I1,J1) (TEXT,ICON); ! = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Actionbutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S --- 3446,3450 ---- IT:QtObject = make_gui pushbutton_gui (I1,J1) (TEXT,ICON); ! = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Actionbutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S *************** *** 3437,3441 **** IT:QtObject = make_gui actionbutton_gui (I1,J1) (TEXT,ICON,INIT); ! = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Togglebutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S --- 3453,3457 ---- IT:QtObject = make_gui actionbutton_gui (I1,J1) (TEXT,ICON,INIT); ! = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Togglebutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S *************** *** 3444,3448 **** IT:QtObject = make_gui togglebutton_gui (I1,J1) (TEXT,ICON,INIT); ! = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Taskbutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S --- 3460,3464 ---- IT:QtObject = make_gui togglebutton_gui (I1,J1) (TEXT,ICON,INIT); ! = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Taskbutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S *************** *** 3451,3455 **** IT:QtObject = make_gui taskbutton_gui (I1,J1) (TEXT,INIT); ! = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Combobox: (\\([0-9]+,[0-9]+\\)) (.*)$" S --- 3467,3471 ---- IT:QtObject = make_gui taskbutton_gui (I1,J1) (TEXT,INIT); ! = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Combobox: (\\([0-9]+,[0-9]+\\)) (.*)$" S *************** *** 3457,3461 **** (I1,J1) = val K1, (SL,INIT) = val S1, IT:QtObject = make_gui combobox_gui (I1,J1) (SL,INIT); ! = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Comboedit: (\\([0-9]+,[0-9]+\\)) (.*)$" S --- 3473,3477 ---- (I1,J1) = val K1, (SL,INIT) = val S1, IT:QtObject = make_gui combobox_gui (I1,J1) (SL,INIT); ! = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Comboedit: (\\([0-9]+,[0-9]+\\)) (.*)$" S *************** *** 3463,3467 **** (I1,J1) = val K1, (SL,INIT) = val S1, IT:QtObject = make_gui comboedit_gui (I1,J1) (SL,INIT); ! = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Spinbox: (\\([0-9]+,[0-9]+\\)) (.*)$" S --- 3479,3483 ---- (I1,J1) = val K1, (SL,INIT) = val S1, IT:QtObject = make_gui comboedit_gui (I1,J1) (SL,INIT); ! = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Spinbox: (\\([0-9]+,[0-9]+\\)) (.*)$" S *************** *** 3471,3475 **** IT:QtObject = make_gui spinbox_gui (I1,J1) (MIN,MAX,STEP,INIT,SPECIAL,PREF,SUFF,V2T,T2V); ! = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Slider: (\\([0-9]+,[0-9]+\\)) (.*)$" S --- 3487,3491 ---- IT:QtObject = make_gui spinbox_gui (I1,J1) (MIN,MAX,STEP,INIT,SPECIAL,PREF,SUFF,V2T,T2V); ! = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Slider: (\\([0-9]+,[0-9]+\\)) (.*)$" S *************** *** 3480,3491 **** (MIN,MAX,STEP,INIT,VERT); // anything else just gets passed to the digest function, and we try again ! = local (digest S) || results_loop U [(I,J)|V]; otherwise: /* No result yet. Process some pending GUI events, to give the user a chance to abort the computation. */ = do flag [(I,J)|V] ! if wait_cursor || local (qt APP "processEvents" 100) || ! get ABORTED; ! = results_loop U [(I,J)|V] otherwise; /* Note that we try the semaphore *two* times before we give up and hand it --- 3496,3507 ---- (MIN,MAX,STEP,INIT,VERT); // anything else just gets passed to the digest function, and we try again ! = local (digest S) || results_loop T0 U [(I,J)|V]; otherwise: /* No result yet. Process some pending GUI events, to give the user a chance to abort the computation. */ = do flag [(I,J)|V] ! if (if time-T0>=0.5 then wait_cursor) || ! local (qt APP "processEvents" 100) || get ABORTED; ! = results_loop T0 U [(I,J)|V] otherwise; /* Note that we try the semaphore *two* times before we give up and hand it *************** *** 3541,3545 **** doprocess (I,J) = insert_cells (I,J) || ! cell_setval (I,J) () || clear_cell (I,J) || // do the necessary reevaluations if check_interp then compute V --- 3557,3562 ---- doprocess (I,J) = insert_cells (I,J) || ! cell_setval (I,J) () || ! if is_gui_elem (I,J) then clear_cell (I,J) || // do the necessary reevaluations if check_interp then compute V *************** *** 3569,3578 **** process1 (I,J,S) ! = clear_cell (I,J) || insert_cells (I,J) || insert_eval (I,J;S,'X,DEPS) || cell_setval (I,J) () where ("=",S) = (hd S,trim (tl S)), 'X = parse S, DEPS = deps 'X; ! = clear_cell (I,J) || set_cell (I,J) S || insert_cells (I,J) || delete_eval (I,J) || cell_setval (I,J) () --- 3586,3596 ---- process1 (I,J,S) ! = if is_gui_elem (I,J) then clear_cell (I,J) || insert_cells (I,J) || insert_eval (I,J;S,'X,DEPS) || cell_setval (I,J) () where ("=",S) = (hd S,trim (tl S)), 'X = parse S, DEPS = deps 'X; ! = if is_gui_elem (I,J) then clear_cell (I,J) || ! set_cell (I,J) S || insert_cells (I,J) || delete_eval (I,J) || cell_setval (I,J) () *************** *** 3589,3602 **** if not null W and then check_interp; ! process2 (I,J,S) ! = cell_setval (I,J) () if is_qt_object S; ! = clear_cell (I,J) || insert_cells (I,J) || insert_eval (I,J;S,'X,DEPS) || ! cell_setval (I,J) () where ("=",S) = (hd S,trim (tl S)), 'X = parse S, DEPS = deps 'X; ! = clear_cell (I,J) || set_cell (I,J) S1 || cell_setval (I,J) S0 || ! insert_cells (I,J) || delete_eval (I,J) where S0 = cell_getval (I,J), (S0,S1) = if isstr S0 then unquote S else ((),S) --- 3607,3623 ---- if not null W and then check_interp; ! process2 CHK (I,J,S) ! = cell_setval (I,J) () || check_deps CHK (I,J) ! if is_qt_object S; ! = if is_gui_elem (I,J) then clear_cell (I,J) || insert_cells (I,J) || insert_eval (I,J;S,'X,DEPS) || ! cell_setval (I,J) () || check_deps CHK (I,J) where ("=",S) = (hd S,trim (tl S)), 'X = parse S, DEPS = deps 'X; ! = if is_gui_elem (I,J) then clear_cell (I,J) || ! set_cell (I,J) S1 || cell_setval (I,J) S0 || ! insert_cells (I,J) || delete_eval (I,J) || ! check_deps CHK (I,J) where S0 = cell_getval (I,J), (S0,S1) = if isstr S0 then unquote S else ((),S) *************** *** 3604,3617 **** = clear_cell (I,J) || delete_cells (I,J) || delete_eval (I,J) || ! cell_setval (I,J) () otherwise; process_sel2 W = if check_interp then compute V ! where //_ = printf "*** pending updates: %s\n" $ str W, ! _ = do process2 W, ! W = map (flip (flip sub 0) 1) W, // Exclude all toplevel GUI elements from this list // (unless they are triggered by other elements). V = eval_list (neg is_gui_elem) W if not null W and then check_interp; --- 3625,3644 ---- = clear_cell (I,J) || delete_cells (I,J) || delete_eval (I,J) || ! cell_setval (I,J) () || check_deps CHK (I,J) otherwise; + check_deps CHK (I,J) + = true if CHK; + = not null W where W:List = get XREF!(I,J); + = false otherwise; + process_sel2 W = if check_interp then compute V ! where W = map (flip (flip sub 0) 1) W, // Exclude all toplevel GUI elements from this list // (unless they are triggered by other elements). V = eval_list (neg is_gui_elem) W + if CHK + where //_ = printf "*** pending updates: %s\n" $ str W, + CHK = foldl process2 false W if not null W and then check_interp; Index: calclib.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/calclib.q,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** calclib.q 18 Nov 2007 04:28:19 -0000 1.40 --- calclib.q 20 Nov 2007 18:58:28 -0000 1.41 *************** *** 135,155 **** indexarg 'X = (I,J) where (I,J) = cellindex 'X; ! setval KEY X = printf "\f+++ Update: %s %s\n" (str (I,J),str X) || flush || ! if member (get YYDATA) (I,J) then yyset (I,J) X else X ! where (I:Int,J:Int) = indexarg KEY; ! clearval KEY X = printf "\f+++ Clear: %s %s\n" (str (I,J),str X) || flush || ! if member (get YYDATA) (I,J) then yyset (I,J) X else X where (I:Int,J:Int) = indexarg KEY; ! // setval without flushing the output pipe, to speed up mass updates ! private setvaln KEY X; ! setvaln KEY X = printf "\f+++ Update: %s %s\n" (str (I,J),str X) || ! if member (get YYDATA) (I,J) then yyset (I,J) X else X where (I:Int,J:Int) = indexarg KEY; matrix KEY Xs:List ! = dowith setvaln Ks (cat Xs) || flush || Xs ! where Ks = [(I0+I,J0+J) : I in [0..N-1], J in [0..M-1]] if all islist Xs and then all ((=M).(#)) Xs where Ys:List = hd Xs, N = #Xs, M = #Ys --- 135,163 ---- indexarg 'X = (I,J) where (I,J) = cellindex 'X; ! private setvaln KEY X; ! setvaln (I,J) X = if member (get YYDATA) (I,J) then yyset (I,J) X else X; ! ! setval KEY X = printf "\f+++ Update: %s %s\n" (str (I,J),str X) || ! setvaln (I,J) X where (I:Int,J:Int) = indexarg KEY; ! clearval KEY X = printf "\f+++ Clear: %s %s\n" (str (I,J),str X) || ! setvaln (I,J) X where (I:Int,J:Int) = indexarg KEY; + private matrixn KEY DIM Xs, pairs I Js; + + matrixn (I0,J0) (N,M) Xs + = printf "\f+++ Matrix: %s\n" (str Ys) || + dowith setvaln Ks Xs || Xs + where Ks = cat $ map + (flip pairs [J0..J0+M-1]) [I0..I0+N-1], + Ys = zipwith append Ks $ map str Xs; + + pairs I Js = map (pair I) Js; + matrix KEY Xs:List ! = matrixn (I0,J0) (N,M) (cat Xs) || Xs if all islist Xs and then all ((=M).(#)) Xs where Ys:List = hd Xs, N = #Xs, M = #Ys *************** *** 157,165 **** rowvect KEY Xs:List ! = matrix (I0,J0) [Xs] || Xs where (I0:Int,J0:Int) = indexarg KEY; colvect KEY Xs:List ! = matrix (I0,J0) $ map (push []) Xs || Xs where (I0:Int,J0:Int) = indexarg KEY; --- 165,173 ---- rowvect KEY Xs:List ! = matrixn (I0,J0) (1,#Xs) Xs || Xs where (I0:Int,J0:Int) = indexarg KEY; colvect KEY Xs:List ! = matrixn (I0,J0) (#Xs,1) Xs || Xs where (I0:Int,J0:Int) = indexarg KEY; *************** *** 192,196 **** pushbutton (S:String,ICON:String) = printf "\f+++ Pushbutton: %s %s\n" ! (str (I,J),str (S,ICON)) || flush || false where (I,J) = get YYKEY; --- 200,204 ---- pushbutton (S:String,ICON:String) = printf "\f+++ Pushbutton: %s %s\n" ! (str (I,J),str (S,ICON)) || false where (I,J) = get YYKEY; *************** *** 201,205 **** togglebutton (S:String,ICON:String,INIT:Bool) = printf "\f+++ Togglebutton: %s %s\n" ! (str (I,J),str (S,ICON,INIT)) || flush || INIT where (I,J) = get YYKEY; --- 209,213 ---- togglebutton (S:String,ICON:String,INIT:Bool) = printf "\f+++ Togglebutton: %s %s\n" ! (str (I,J),str (S,ICON,INIT)) || INIT where (I,J) = get YYKEY; *************** *** 362,366 **** H:Thread = printf "\f+++ Taskbutton: %s %s\n" ! (str (I,J),str (S,INIT)) || flush || thread (begin_task (I,J,SEM) || do_task X (I,J,SEM) || end_task (I,J,SEM)); --- 370,374 ---- H:Thread = printf "\f+++ Taskbutton: %s %s\n" ! (str (I,J),str (S,INIT)) || thread (begin_task (I,J,SEM) || do_task X (I,J,SEM) || end_task (I,J,SEM)); *************** *** 402,406 **** /* Internals. */ ! yymain = setvbuf OUTPUT IOFBF || writes "\f+++ Ready.\n" || flush || yyloop; yyloop where S:String = reads: = yyloop where 'X = valq S, Y = catch yyerror X; --- 410,414 ---- /* Internals. */ ! yymain = writes "\f+++ Ready.\n" || flush || yyloop; yyloop where S:String = reads: = yyloop where 'X = valq S, Y = catch yyerror X; *************** *** 478,482 **** where (H,SEM,'_) = get YYTASKS!(I,J): // task is alive and kicking, update it with the new data ! = post SEM '(taskbutton (S,INIT) X) || INIT where 'X = subst 'X if isthread H and then active H; --- 486,493 ---- where (H,SEM,'_) = get YYTASKS!(I,J): // task is alive and kicking, update it with the new data ! = printf "\f+++ Taskbutton: %s %s\n" ! (str (I,J),str (S,INIT)) || ! printf "\f+++ Taskstate: %s 1\n" (str (I,J)) || flush || ! post SEM '(taskbutton (S,INIT) X) || INIT where 'X = subst 'X if isthread H and then active H; |