[q-lang-cvs] qcalc qcalc.q,1.110,1.111
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-11-08 05:17:50
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29721 Modified Files: qcalc.q Log Message: overhauled spreadsheet load/new code, added some code for debugging callbacks Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** qcalc.q 7 Nov 2007 22:08:45 -0000 1.110 --- qcalc.q 8 Nov 2007 05:17:44 -0000 1.111 *************** *** 305,308 **** --- 305,316 ---- where P = qt MAIN "pos" (); + /* Uncomment this for debugging purposes. */ + + // @1 + // qt_invoke OBJ SLOT ARGS + // = printf "invoke: %s %s %s\n" (str OBJ,str SLOT,str ARGS) || + // fail if neq SLOT timer; + // @0 + /* Helper functions for string manipulation. */ *************** *** 486,490 **** statusmsg S = qt STATUS "message" S; // like statusmsg, but must be processed immediately: ! waitmsg S = statusmsg S || qt APP "processEvents" 0; /* Application cursor. */ --- 494,500 ---- statusmsg S = qt STATUS "message" S; // like statusmsg, but must be processed immediately: ! waitmsg S = statusmsg S || GLOBAL := false || ! qt APP "processEvents" () || GLOBAL := G ! where G = get GLOBAL; /* Application cursor. */ *************** *** 1625,1640 **** where F:File = fopen NAME "r": = add_recent_file NAME || ! if RES then process_all || mark_undo L1 || if RES then digest_loop || () ! where _ = // initializations ! highlight_clear_cache || ! qt EDIT "setText" SCRIPT || ! highlight_flush_cache || ! qt EDIT "setCursorPosition" (0,0) || ! EDITED := false || qt EDIT "setModified" false || ! FILENAME := NAME || update_title || ! do (qt TABLE "clearCell") (keys (get CELLS)) || CELLS := hdict (zip KEYS (map (cst true) KEYS)) || EVAL := hdict (zip KEYS2 (zip3 VALS2 XVALS2 DEPS)) || --- 1635,1648 ---- where F:File = fopen NAME "r": = add_recent_file NAME || ! if RES then (waitmsg "Computing..." || process_all) || mark_undo L1 || if RES then digest_loop || + statusmsg "Done" || () ! where OLD_KEYS = keys $ get CELLS, ! _ = // initializations ! CELLS := emptyhdict || ! EVAL := emptyhdict || ! do (qt TABLE "clearCell") OLD_KEYS || CELLS := hdict (zip KEYS (map (cst true) KEYS)) || EVAL := hdict (zip KEYS2 (zip3 VALS2 XVALS2 DEPS)) || *************** *** 1643,1647 **** do (\J.qt TABLE "setColumnWidth" (J,DEF_WD)) COLS || do (qt TABLE "setRowHeight") HT || ! do (qt TABLE "setColumnWidth") WD, RES = // give the interpreter some time to start up waitmsg "Compiling..." || init_interp --- 1651,1661 ---- do (\J.qt TABLE "setColumnWidth" (J,DEF_WD)) COLS || do (qt TABLE "setRowHeight") HT || ! do (qt TABLE "setColumnWidth") WD || ! EDITED := false || qt EDIT "setModified" false || ! FILENAME := NAME || update_title || ! highlight_clear_cache || ! qt EDIT "setText" SCRIPT || ! highlight_flush_cache || ! qt EDIT "setCursorPosition" (0,0), RES = // give the interpreter some time to start up waitmsg "Compiling..." || init_interp *************** *** 1676,1690 **** MYMAGIC = "// qcalc"; // no qcalc header, read as ordinary script ! = highlight_clear_cache || qt EDIT "setText" SCRIPT || highlight_flush_cache || qt EDIT "setCursorPosition" (0,0) || - EDITED := false || qt EDIT "setModified" false || - FILENAME := NAME || update_title || - do (qt TABLE "clearCell") (keys (get CELLS)) || - do (\I.qt TABLE "setRowHeight" (I,DEF_HT)) ROWS || - do (\J.qt TABLE "setColumnWidth" (J,DEF_WD)) COLS || - CELLS := emptyhdict || - EVAL := emptyhdict || init_interp || mark_undo [] || --- 1690,1704 ---- MYMAGIC = "// qcalc"; // no qcalc header, read as ordinary script ! = do (qt TABLE "clearCell") (keys (get CELLS)) || ! CELLS := emptyhdict || ! EVAL := emptyhdict || ! do (\I.qt TABLE "setRowHeight" (I,DEF_HT)) ROWS || ! do (\J.qt TABLE "setColumnWidth" (J,DEF_WD)) COLS || ! EDITED := false || qt EDIT "setModified" false || ! FILENAME := NAME || update_title || ! highlight_clear_cache || qt EDIT "setText" SCRIPT || highlight_flush_cache || qt EDIT "setCursorPosition" (0,0) || init_interp || mark_undo [] || *************** *** 1696,1709 **** fread_data F = fread F where () = fscanf F "//"; ! new _ _ _ = highlight_clear_cache || ! qt EDIT "setText" "" || ! highlight_flush_cache || ! EDITED := false || qt EDIT "setModified" false || ! FILENAME := () || update_title || ! do (qt TABLE "clearCell") (keys (get CELLS)) || ! do (\I.qt TABLE "setRowHeight" (I,DEF_HT)) ROWS || ! do (\J.qt TABLE "setColumnWidth" (J,DEF_WD)) COLS || CELLS := emptyhdict || EVAL := emptyhdict || init_interp || mark_undo [] || --- 1710,1724 ---- fread_data F = fread F where () = fscanf F "//"; ! new _ _ _ = do (qt TABLE "clearCell") (keys (get CELLS)) || CELLS := emptyhdict || EVAL := emptyhdict || + do (\I.qt TABLE "setRowHeight" (I,DEF_HT)) ROWS || + do (\J.qt TABLE "setColumnWidth" (J,DEF_WD)) COLS || + EDITED := false || qt EDIT "setModified" false || + FILENAME := () || update_title || + highlight_clear_cache || + qt EDIT "setText" "" || + highlight_flush_cache || + qt EDIT "setCursorPosition" (0,0) || init_interp || mark_undo [] || |