![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Intelligent deletion Topic Summary: Can I delete the source object when I want to delete the target one, and vice versa ? Created On: 2-Jun-2008 15:11 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hello everybody
I would like to customize the object deletion mechanism. Here is my need : when a user wants to delete an object, he has to be warned if this object is linked to another one(s). (like when you try to delete an object with incoming links). If it is the case, he must be able to choose between :
* deleting the current object and some of objects linked to it * canceling the deletion I don't know how to do that. I thought about triggers, or native functions overriding, but I didn't find any solution. Thanks for your help ! Guillaume |
|
![]() |
|
![]() |
|
A trigger would be the way to go, but I don't think there's a trigger for object deletions, though a trigger on an object sync might work. I don't know I haven't tried it.
Overriding the delete object menu functions would work, the only problem is if the user just hits the "Delete" key. There's no way to detect that, other than a trigger if it were possible. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Thanks Scott
I found a way to fire on an object deletion. I created a post sync trigger on all objects which executes the following code when it fires. First of all I introduced a new boolean attribute "Is Deleted" on the objects, initialized to false. I noticed that when you delete an object, the next one becomes the current object, and that fires the post sync trigger. So each time the trigger fires on an object, I look at its previous object and test if it has just been deleted. As the 'previous' function only parses the displayed objects, I must show the deleted ones before with "showDeletedObjects(true)". Then the function 'isDeleted' allows me to test if the object is softdeleted, and the attribute "Is Deleted" is used to know if the object has just been deleted. At the end, when I have done what I wanted to do, I set the attribute "Is Deleted" to true. |
|
![]() |
|
![]() |
|
Oops
Finally it is not so simple. I always have the problem that Doors does not want to delete an object with incoming links, so the trigger can not fire... Is it possible to disable this warning ? |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Intelligent deletion
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.