[q-lang-cvs] qcalc calclib.q,1.41,1.42 qcalc.q,1.171,1.172
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-11-22 03:12:46
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25105 Modified Files: calclib.q qcalc.q Log Message: bugfixes Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -d -r1.171 -r1.172 *** qcalc.q 22 Nov 2007 01:50:18 -0000 1.171 --- qcalc.q 22 Nov 2007 03:12:41 -0000 1.172 *************** *** 636,639 **** --- 636,641 ---- evaluations. */ + def CBQ = semaphore; + def WL = [abort,eval,gui_update,popup,text_changed,linenumbermsg,indent], BL1 = [eval,gui_update], BL2 = [timer]; *************** *** 644,647 **** --- 646,652 ---- // fail if neq SLOT timer; // Blacklist #1: these are always inhibited in recursive mode. + // XXXFIXME: eval, gui_update must be kept (queued?) here if they originate + // from a real GUI interaction, but how do we detect this if collect_results + // always sets the recursive mode?? = true if is_recursive and then any (eq SLOT) BL1; // Blacklist #2: these are always inhibited in local mode. *************** *** 652,656 **** // here (unless in recursive mode), in local mode these callbacks will // simply queue a corresponding GUI update request for later processing. ! = post MSGS '(SLOT OBJ (qt_data OBJ) ARGS || true) || true if not is_global and then all (neq SLOT) WL; @0 --- 657,661 ---- // here (unless in recursive mode), in local mode these callbacks will // simply queue a corresponding GUI update request for later processing. ! = post CBQ '(SLOT OBJ (qt_data OBJ) ARGS || true) || true if not is_global and then all (neq SLOT) WL; @0 *************** *** 765,769 **** qt EDIT "isRedoAvailable" (); ! digest_loop = digest_loop_at time || do_queued_updates; /* Make sure that we eventually return from the loop in local mode, so that --- 770,774 ---- qt EDIT "isRedoAvailable" (); ! digest_loop = digest_loop_at time; /* Make sure that we eventually return from the loop in local mode, so that *************** *** 771,779 **** there's a lot of asynchronous messages to process. */ digest_loop_at T0 = digest S || digest_loop_at T0 where S = get MSGS ! if (#MSGS>0) and then ! (is_global or else (time-T0<=0.5)); = () otherwise; --- 776,788 ---- there's a lot of asynchronous messages to process. */ + // XXXFIXME: need a fair scheduler here digest_loop_at T0 + = do_queued_updates || fail; // falls through = digest S || digest_loop_at T0 where S = get MSGS ! if (#MSGS>0) and then (time-T0<=0.5); ! = digest X || digest_loop_at T0 ! where X = get CBQ ! if is_global and then (#CBQ>0); = () otherwise; *************** *** 787,790 **** --- 796,810 ---- /* Digest output from the inferior Q process. */ + // preformatted text: + digest (formatted S:String) + = qt LOG "append" S || qt LOG "scrollToBottom" () + otherwise; + // background task: + digest 'X = X; + // pending updates: + digest W:List = process_sel2 W || merge_undo $ map (flip (flip sub 0) 1) W + if get STATE = 4; + + // other messages from the inferior process: digest "+++ Compile:" = STATE := 1; digest "+++ Error." = STATE := 2 || *************** *** 800,811 **** digest "+++ Exiting." = STATE := 0; - // preformatted text - digest (formatted S:String) - = qt LOG "append" S || qt LOG "scrollToBottom" () - otherwise; - - digest 'X = X; // background task - digest W:List = process_sel2 W || merge_undo $ map (flip (flip sub 0) 1) W - if get STATE = 4; digest S:String = /* The program generated output before we got the "Ready" message, assume that we're up and running anyway. */ --- 820,823 ---- *************** *** 1218,1222 **** = process_gui2 (I,J) X || digest_loop where X:QtObject = gui_elem (I,J); ! = post MSGS '(check_last_gui (I,J,X)) where X:QtObject = finish_edit true (I,J) || gui_elem (I,J); --- 1230,1234 ---- = process_gui2 (I,J) X || digest_loop where X:QtObject = gui_elem (I,J); ! = post CBQ '(check_last_gui (I,J,X)) where X:QtObject = finish_edit true (I,J) || gui_elem (I,J); Index: calclib.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/calclib.q,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** calclib.q 20 Nov 2007 18:58:28 -0000 1.41 --- calclib.q 22 Nov 2007 03:12:41 -0000 1.42 *************** *** 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; --- 486,490 ---- 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; |