pagedelete
Posted: Sun May 01, 2011 3:16 am
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).
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).