![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Trigger by clicking a specific object Topic Summary: Created On: 30-Mar-2005 17:58 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|||
I need dxl code to trigger attached code when an user clicks on a specific object.
For example, when an clicks on column E in a current open module, a GUI will pop up. Thanks in advance for you help! Thanh
|
|||
![]() |
|||
![]() |
|||
According to the DXL Reference Manual, triggers must be applied to a project, module, object, or attribute. To accomplish what you ask, you need to create an attribute trigger. Unfortunately, attributes can only be triggered off the "save" event (pre or post) which means your user must be able to write to the attribute to fire the trigger.
Follow these steps and use the attached code. It should give you a good starting point.
2. Create a new type (I called mine "Trigger"), of type Enumeration with only one possible value -- "List TC Name" 3. Create an Object attribute (I called mine "List TC Name") and assign it to the type you created, no default value. The other options don't matter because if you do this right, the attribute can never change value. Insert the new attribute into the current view. 4. Run the attached code in the same module to create the trigger. Make sure the constant ATTRIB_NAME is set to the same name you used in step 3. 5. Select any object and double-click it's "List TC Name" attribute, select the enumeration value "List TC Name", and a window will pop-up. No matter if you click Run or Cancel, when the window closes, the trigger will cause the attribute value to not be set. Some notes: This code was developed and tested using DOORS 7.1, patch 008. The DXL script that shows the dialog box concludes with the line "set trigPreConFail", which forces the attribute value to be un-set, inserting no history into the module. I used "block" to raise the dialog because it accomplishes to things. (1) it is modal and forces the user to finish the event, and (2) when you use "show", the dialog box hides behind the module that's currently open. Again, the attribute must be writable to get the trigger to fire. If the module is open read-only, or if the user does not have access to modify the attribute, the trigger can not be fired. Good luck! Edited: 31-Mar-2005 at 17:01 by Dennis Lockshine |
|||
![]() |
|||
![]() |
|||
An Object-sync trigger will fire when you change the current object in the module. You cannot, as far as I can tell, determine which column the user clicked in.
An attribute trigger will fire only when you save a change, which would be after the user modifies a column and clicks somewhere else. function attrDef(Trigger) returns the name of the attribute being saved (incorrectly documented in the manual). - Louie |
|||
![]() |
Telelogic DOORS
» DXL Exchange
»
Trigger by clicking a specific object
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.