On Thu, Dec 8, 2016 at 11:28 AM, djc <[email protected]> wrote:

> Sorry....not very well formatted question.
>
> When I use the c.k.simulateCommand() method, it does an immediate redraw
> of the outline.  I would like to suppress the redraw until after I am done
> making changes.  I am looking at using position methods to do the same
> thing so that I control the redraw, but haven't had time to suss it out
> yet.
>

​As Terry says, using position methods will work, but these are low-level
methods.  Using Commander (c) methods will be more convenient, provided you
can make them do what you want them to do.

As Terry notes, there is one (and I think only one) performance issue to be
aware of: p.setDirty. p.v.setDirty is much faster.  Use p.v.setDirty unless
your @<file> nodes aren't being set dirty properly.

One more note: It's really important to understand that c.redraw() only
*requests* a redraw, to be done when the command completes.
c.k.simulateCommand does actually complete the command, which is why it's
not great to string several such calls together--you'll get multiple full
redraws.  If your script does need an immediate redraw, you can call
c.redraw_now().

HTH.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to