Event for deletion picture
Event for deletion picture
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?
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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).
- 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).