Page 1 of 1

pagedelete

Posted: Sun May 01, 2011 3:16 am
by jlbrillet
About the pagedelete statement

First, you cannot use @isobject to test if a page exists and delete it.

I understand a page is not an object but an exception could perhaps be made.

This means that if you want to make sure a page does not exist by destroying it, you get an annoying error message if it does not already.

Second and more important : if you delete a page through "pagedelete" in a multi-page workfile, you move to the first page in the workfile. To make sure you remain in the current one, you need to specify "pageselect" immediately after.

Not doing it can have damaging consequences (like modifying the wrong page and saving everything).

Re: pagedelete

Posted: Sun May 01, 2011 8:32 am
by EViews Gareth
First, you cannot use @isobject to test if a page exists and delete it.

I understand a page is not an object but an exception could perhaps be made.
Hence the existence of the @pageexist command.

I'll see if we can modify the skipping to the first page.

Re: pagedelete

Posted: Mon May 02, 2011 3:46 pm
by EViews Gareth
Latest patch modifies the behaviour to stick to the page you're currently on (unless that is the page that was deleted, in which case it moves you to the first page).