[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ctedit Redraw
In article <17054@sophia.inria.fr>, kuehne@pi.informatik.th-darmstadt.de (Thomas Kuehne) writes:
=> I implemented an undo function that restores the contents of two ctedits.
=> It worked without trouble when it was evoked via popup from a third ctedit.
If i understand you correctly, you have 3 ctedits (let's call them A, B, and C).
In ctedit A, you popup a menu that changes the contents of B and C. Is this
true?!
=> When i call the same function via popup from one of the ctedits, whichs
=> contents changes the ctedit with the popup will not redisplay/redraw
=> the change of it's content.
Now you want to redo your code, so that you can popup a menu in, say B, and
change the contents of B and C?
=> I tried to redefine the mouse behaviour with the following lines:
=> ... [ stuff deleted, which your second message points out is useless ]
=> (de :mouse-up (ctedit event)
=> ({ctedit}:popup:mouse-up ctedit event)
=> (send 'redraw ctedit)
With this call you, you hope to redraw B only?! i don't see where you
hope to redraw C?
=> This will not work either.
=> If i do the redraw from the menu of the ctedit or by typing the
=> (send 'redraw ctedit) in the console the ctedit correctly redraws.
=> How can i force redrawing from a function called via popup ?
You can't, the action associated to a button in a menu (popup or otherwise)
results in putting an event in the LeLisp event queue that says to execute
the action. Thus, you "post" the event (to the event manager) then you redraw.
Unfortunately, your redraw is done before the code of your action is executed
thus you redraw then change the variable. The reason the redraw works when
you execute it from the Display pulldown is that you post an event after the
event that does the change. The way to have this work, in version 1.1, is to
have the redrawing of the ctedits B and C be done in the action that is executed.
(NB: i know it doesn't help but in the *soon* to be released 1.2 the variable
change will provoke the incremental redisplay of the ctedit whose variable
has been changed!)
--janet
- References:
- Ctedit Redraw
- From: kuehne@pi.informatik.th-darmstadt.de (Thomas Kuehne)