![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: about trigger Topic Summary: Created On: 20-Dec-2002 16:09 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi everybody,
I want to set a module based trigger. From the DOORS DXL MANUAL, I know I should store this trigger with this module. But I don't understand how to do it. Can anybody tell me where exactly the physical location the following code should be stored? Trigger t2 = trigger("mod", module->all, pre, close, 10, "#include <triggers/modClose>") thanks a lot, hong |
|
![]() |
|
![]() |
|
The "Level" of the trigger determines the stored location. Since your level is "all modules" but not "all projects", it should store the trigger in the current PROJECT. To store it in the current module, you will need to say "module -> current" or "module -> NameModule"; but then it will only apply to this module.
I had to write a separate script just to find and remove triggers left all over the place. Odd there is no mechanism for doing that normally. |
|
![]() |
|
![]() |
|
Louie,
Thanks a lot for your help. Bear with me, I am still not very clear where this piece of code to be stored? Should I save this piece of code as trigger.dxl, then find this particular module folder (e.g., m0000000x.mod) and put the trigger.dxl in it? thanks again, hong |
|
![]() |
|
![]() |
|
Do NOT find and modify the internal database file system. If you are new to DXL, you may want to avoid triggers.
You will obviously want to keep the code somewhere yourself. "LayOut" dxl is stored in the relevant module "view"; likewise active trigger code is stored as per the defined level. To activate the trigger code, you need to write MORE dxl code to define the trigger (such as you have done). When you run your example what gets "stored" in the project is the "#include" statement, which points to the body of the trigger that you have stored in "triggers/modClose", wherever that is <<no doubt some file location relative to your "addins" path>>. This is a good construct since it lets you modify the body and the trigger automatically gets updated. The bad news is that everybody will need to have access to the exact same locations before your trigger will apply to everyone. Unlike layout, you really don't care where the trigger is "stored". The current problem with triggers is that there is no mechanism for removing them or even displaying them: you have to write special code for each trigger (or write some code that searches for triggers and offers to delete them). - Louie |
|
![]() |
|
![]() |
|
Hi, Louie,
Do you mind sharing how to find all triggers present in a project or module? Thanks! Catherine |
|
![]() |
|
![]() |
|
void PrintTrigger(Trigger trg)
{ string Name = trg.name print Name "\n" if (confirm("Delete trigger '" Name "'??)) delete(trg) } Trigger trg for trg in database do PrintTrigger(trg) for trg in current Project do PrintTrigger(trg) for trg in current Module do PrintTrigger(trg) |
|
![]() |
|
![]() |
|
Thanks again, Louie! You are the best!
Catherine |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
about trigger
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.