[Ipe-discuss] UI-update
Otfried Cheong
otfried at ipe.airpost.net
Sat Nov 26 02:34:09 CET 2011
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
More information about the Ipe-discuss
mailing list