Re: How to delete an object with an ipelet?
Otfried Cheong <[email protected]>
| Newsgroups | gmane.comp.graphics.ipe.general |
|---|---|
| Message-ID | <[email protected]> |
On 11/29/2011 06:53 PM, elwood151 wrote: > How can I delete an object with an ipelet? > > I'm parsing all objects with a loop like > local p=model:page() > for i, obj, sel, layer in p:objects() do > ... > > and then want to delete some of them. > > I tried p[i]:delete() but it does not work. It's p:remove(i), see http://ipe7.sourceforge.net/manual/luapage.html But you MUST NOT do this directly. You must do the actual work inside an undo item - see the example ipelets (or any of the methods in actions.lua). Cheers, Otfried