![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Special Attribute ? Topic Summary: Created On: 9-Dec-2008 18:22 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi everybody,
How to set an attribute value with DXL but prohibit its setting by a user in GUI? Is there a way to do that without managing accesses on the attribute? Thanks for answers JP. HENG |
|
![]() |
|
![]() |
|
Use an attributeDXL
|
|
![]() |
|
![]() |
|
Thanks ron for the quick answer.
Can you give me an example for this attribute DXL please? |
|
![]() |
|
![]() |
|
Look under attrDXL in help file to see attached
// impact.dxl -- example of DXL attribute /* DXL attribute provides a means of initializing an attribute using DXL, so that subsequent accesses of the attribute do not involve re-calculation. This example of DXL attribute requires that an integer attribute named "Outgoing" exists and has been defined with the DOORS GUI to use this file as its DXL value. "Outgoing" is set to the number of links leaving its object. */ Link l int count = 0 // obj is the predeclared object whose attribute // we are calculating for l in obj->"*" do count++ // count outgoing links obj."Outgoing" = count // initialize the cached value // resetting to (string null) // in a DXL program // will force re-calculation // end of impact.dxl |
|
![]() |
|
![]() |
|
Ok is see how to do that but how can i know if it is a DXL script or a user in GUID that are trying to set the value?
|
|
![]() |
|
![]() |
|
You can not modify the value of an attributeDXL variable via the GUI. You can, however, modify the value using DXL, but the value will not persist, as it will be re-calculated at the next possibility, e.g when the module is re-opened again.
Peter |
|
![]() |
|
![]() |
|
You can use a Trigger mechanism that will not allow changes to attributes to be saved (under the condition that the attribute meets certain conditions, such as its name or type, or whatever).
The DXL code that will modify the value will need to disable the trigger, change the attribute and re-enable the trigger. I've done this in the past with success to be able to lock certain attributes of an object if that object was linked to a certain module. This is just a general direction you may want to follow... Regards, Marcel Edit: See also the following thread: https://forum.telelogic.com/customer/doors//messageview.cfm?catid=17&threadid=8737 Edited: 10-Dec-2008 at 12:21 by Marcel van der Laan |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Special Attribute ?
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.