![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Creating Dynamic Post-Triggers Topic Summary: Created On: 12-Nov-2002 15:49 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I have the following code...
void postObjectStatusChange( Trigger t){ display "Object Status Changed." } Trigger t=trigger(attribute->all, modify, 10, postObjectStatusChange) ...taken from a DXL manual, but when used it causes DOORS to crash and shutdown. My question is simple... what is wrong with it ? Any help would be appreciated. |
|
![]() |
|
![]() |
|
Don't see this in the v6 DXL manual.
Guess: try using "module->current->attribute->all". or "object->all->attribute->all". You may also want to tell us when DOORS crashes: when you define the trigger or when it gets activated (e.g. you edit an attribute). - Louie |
|
![]() |
|
![]() |
|
When DOORS crashes, are you in a module that is in a folder and not in a project or alternatively, trying to run the script from the "Edit DXL" window brought up from the Database Explorer?
I was trying to work with some persistant module->all triggers last week and DOORS crashed every time I tried to deploy the trigger. I narrowed it down to the fact that I was not in a project. If you want this activity to be triggered for all modules in your DB, you may try something like: triggerOnEditAttribute = trigger("triggerOnEditAttributes", project->all->module->formal->all->attribute->all, post, modify, 10, postObjectStatusChange) ------------------------- Gyan Penrose-Kafka Requirements Management Consultant gyan@zenmonkey.net |
|
![]() |
|
![]() |
|
Thanks for the replies...
<< You may also want to tell us when DOORS crashes: when you define the trigger or when it gets activated (e.g. you edit an attribute). >> The code given only crashes when an attribute is changed. The module exists within a folder, which in turn is within a project. I only want the code to work with the current module so according to the manual 'attribute->all' should be all that is required. Richard. |
|
![]() |
|
![]() |
|
I think that your problem is less to do with the trigger but more to do the the use of 'display'.
Have you got this trigger in column DXL, if so the I would not advise this. It is highly likely to cause some run away resursion/interupt situation. What you would be better to do is either use a persistent trigger, or create your dynamic trigger at startup. (via #includes in startup.dxl). This would then set some attribute. I would hope that the following would work: void postObjectStatusChange( Trigger t){ ack "Object Status Changed." } Trigger t=trigger(attribute->all, modify, 10, postObjectStatusChange ------------------------- andrew.myatt@telelogic.com ![]() |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Creating Dynamic Post-Triggers
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.