Frank Goenninger wrote: > Hi all Cells-users: > > It is the first time I get a > > Current DP 1 not GE pulse 4 of cell > (NIL . <vld>)<4:A ASCENDER/HELVETICA = NIL> > [Condition of type SIMPLE-ERROR] > > error. This code throws the error: > > (defun c-pulse-update (c key) > (declare (ignorable key)) > (unless (find key '(:valid-uninfluenced)) > (trc nil "!!!!!!! c-pulse-update updating !!!!!!!!!!" *data-pulse- > id* c key :prior-pulse (c-pulse c))) > (assert (>= *data-pulse-id* (c-pulse c)) () > "Current DP ~a not GE pulse ~a of cell ~a" *data-pulse-id* (c- > pulse c) c) > (setf (c-pulse c) *data-pulse-id*)) > > Backtrace: > 0: (ERROR "Current DP ~a not GE pulse ~a of cell ~a" 1 4 (NIL . > <vld>)<4:A ASCENDER/HELVETICA = NIL>) > 1: (CELLS::C-PULSE-UPDATE (NIL . <vld>)<4:A ASCENDER/HELVETICA = > NIL> :VALID-UNINFLUENCED) > Locals: > CELLS::C = (NIL . <vld>)<4:A ASCENDER/HELVETICA = NIL> > CELLS::KEY = :VALID-UNINFLUENCED > CELLS::C = (NIL . <vld>)<4:A ASCENDER/HELVETICA = NIL> > #:|g38499| = #(0 NIL ..) > 2: (CELLS::ENSURE-VALUE-IS-CURRENT (NIL . <vld>)<4:A ASCENDER/ > HELVETICA = NIL> :C-READ NIL) > 3: ((:INTERNAL CELLS::CELL-READ 0) NIL NIL) > 4: (CELLS::CALL-WITH-INTEGRITY NIL NIL #<Closure (:INTERNAL > CELLS::CELL-READ 0) @ #x10e6b8da> NIL) > 5: (CELLS::CELL-READ (NIL . <vld>)<4:A ASCENDER/HELVETICA = NIL>) > 6: (CELLS::MD-SLOT-VALUE HELVETICA CNX::ASCENDER) > 7: ((METHOD CNX::ASCENDER (CNX::CELLO-FONT)) HELVETICA) > 8: ((METHOD CNX::FONT-ASCENDER (CNX::CELLO-CONTROL)) FRGO-TEXT-1) > Locals: > CELLS:SELF = FRGO-TEXT-1 > 9: ((:INTERNAL (MOP:CLASS-DEFAULT-INITARGS CNX::CNX-TEXT :LT) 0) > dirty<0:A LT/FRGO-TEXT-1 = NIL>) > 10: (CELLS::CALCULATE-AND-LINK dirty<0:A LT/FRGO-TEXT-1 = NIL>) > 11: ((FLET CELLS::CALCULATE-AND-SET CELLS::BODY)) > 12: (CELLS::CALCULATE-AND-SET dirty<0:A LT/FRGO-TEXT-1 = NIL> :FN- > AWAKEN-CELL NIL) > 13: ((METHOD CELLS::AWAKEN-CELL (CELLS::C-RULED)) dirty<0:A LT/FRGO- > TEXT-1 = NIL>) > 14: ((METHOD CELLS:MD-AWAKEN (CELLS::MODEL-OBJECT)) FRGO-TEXT-1) > 15: ((METHOD CELLS:MD-AWAKEN :AROUND (CELLS::MODEL-OBJECT)) FRGO- > TEXT-1) > 16: ((:INTERNAL (:EFFECTIVE-METHOD 1 NIL NIL T T) 0) FRGO-TEXT-1) > 17: ((:INTERNAL (:INTERNAL (METHOD SHARED-INITIALIZE :AFTER #) 0) > 0) :AWAKEN FRGO-TEXT-1) > 18: (CELLS::JUST-DO-IT :AWAKEN) > 19: (CELLS::FINISH-BUSINESS) > 20: ((FLET CELLS::CALL-WITH-INTEGRITY CELLS::GO-GO)) > 21: (CELLS::CALL-WITH-INTEGRITY NIL NIL #<Closure (:INTERNAL CTK:: > %RUN-WINDOW 0) [CELLO-NX-TEST-MAIN-WINDOW] @ #x10dd0fea> NIL) > 22: (CTK::%RUN-WINDOW) > 23: (CTK::%DO-RUN-WINDOW) > 24: (CTK:RUN-WINDOW CNX-TEST::CELLO-NX-TEST-MAIN-WINDOW) > 25: (CNX-TEST:TEST-MAIN) > > > Now - questions I have are: > > What does :valid-uninfluenced actually mean?
When cell X changes, another cell C becomes current with that change aka valid one of two ways: cell C gets recalculated, or the cells engine determines C does not depend directly or indirectly on X. The latter case is "valid and uninfluenced". > Is the code above correct Yes. > or should the assertion be inside the (unless ...) form? What is the > logic behind? The logic is that it is impossible for a cell pulse to get ahead of *data-pulse-id* without something being broken in the Cells engine, so the engine yells if it sees that. I have encountered this myself, and it is indeed rare. It arose because I had a model instance lying around from a previous iteration. I forget /exactly/ how I did that, but it was trickier than just doing something silly like use a global variable to hold onto some data. ie, It might take some digging to figure out how an old instance is still in play. Wish I could remember the deets. kt _______________________________________________ cells-devel site list cells-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cells-devel