Page 1 of 1

Event for deletion picture

Posted: Sat Apr 24, 2010 8:25 pm
by Tobias
I need to store pictures in separate database table. When picture added to document I save it to database and put unique identifier to tag of that picture. And I use OnRVFPictureNeeded for retrieving picture from database. All works fine, but I have one problem. I need to delete picture from database when user delete it from document, without that database will be filled with lot of unused pictures. My problem that I can determine when picture deleted from document. I don't find any suitable events for that. Any ideas?

Posted: Sun Apr 25, 2010 11:30 am
by Sergey Tkachenko
I think the simplest way is
- to create a list of pictures after the document is loaded,
- to create a list of pictures before the document is saved,
- compare them and determine new and deleted pictures.

As for deleting as an editing operation, you can use OnItemAction event, ItemAction=rviaMovingToUndoList (assuming that UndoLimit property <> 0).