Re: UI-update

Otfried Cheong <[email protected]>
Newsgroups gmane.comp.graphics.ipe.general
Message-ID <[email protected]>
On 11/25/2011 11:54 PM, Troels Sørensen wrote:
> I am currently writing a few ipelets in lua to manipulate layers and
> view, but I have encountered the following problem: after removing some
> views and layers, I cannot get the UI to update sensibly.

That's because what you are doing is completely illegal.  You must NEVER 
modify the document directly inside an ipelet, as this completely messes 
up the undo system.

What you need to do instead is to build an undo item t and register it 
using model:register(t).  That will also take care of updating the UI.

Have a look at the existing ipelets to see how this should work.
And of course read http://ipe7.sourceforge.net/manual/lua-ipelets.html

Cheers,
   Otfried
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.