![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Attribute inherited ... Need Help! Topic Summary: Created On: 19-May-2006 15:22 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi,
Im writing a DXL and need to access the "Inherit" property of an Object. Is that possible ? To see this in doors, you have to lock an object, open the proprieties of the object, select the "attributes" tab, select one of the attributes, and click on Edit... There is an "Attribute Value" window poping up and the "Inherit" checkbox is right there. Any idea how I can access it through DXL Code ?? I know there is a function called isAccessInherited() but I need something that would probably be called isAttributeInherited... Any help would be really appreciated. Edited: 19-May-2006 at 15:26 by Rafal Klodzinski |
|
![]() |
|
![]() |
|
Look up AttrDef in the DXL manual. It has an "inherit" property. You can use "setInherit" to change the value.
You will need to do something like this: AttrDef ad = find(current Module, "MyAttr") ad = modify(ad, setInherit, false) ------------------------- Shawn Stepper shawn.e.stepper@wellsfargo.com |
|
![]() |
|
![]() |
|
I have checked AttrDef before, but the problem is that it affects the "MyAttr" in the whole Module.
And I need to get the "inherit" property of a particular object (ex: the object where Absolute Number = 165) Ex: I have 3 columns ID - Main Column - Model I need to get the "inherit" property of the Model with the ID = 165 Is this even feasable ? |
|
![]() |
|
![]() |
|
There are 6 types of Access Records in the module [1] Module [2] Object [3]Attr Defs [4] Attr Values [5] Attr Types [6] Views. I think you are confusing Object level access with Attribute Value access. BTW, in order to modify an object attribute you need access to both the object and the attribute value.
Anyway, these three DXL perms query and modify object level accesses: isAccessInherited(oCurr, IsInherit) <query>, inherited(oCurr) <sets access to inherited>, specific(oCurr) <sets access to specific - Louie |
|
![]() |
|
![]() |
|
Very late reply, but I was just searching myself for the answer to this very question. I found the solution in a different dusty corner of this forum and thought I post it here in case some else has a need for it:
AttrDef ad = find(current Module, "<put your attribute name here") print hasSpecificValue((current Object), ad) Regards, Peter |
|
![]() |
|
![]() |
|
Aaaahh. hasSpecificValue() will let you know if this obj-attr value is an actual value assigned, or if its been inherited or defaulted. That is, you can make an enumerated attribute with Yes/No/NA options, where NA is defaulted. If you look at an object-attr value and it says 'NA', you don't know if someone actually selected NA for that object, or if its been defaulted. hasSpecificValue will let you distinquish between them.
I see no mechanism in DXL to be able to distinquish between Inherited and Defaulted. That is, if you create an attribute that has a default value 'NA' but also is inherited, I don't think you can tell if a non-hasSpecificValue obj-attr value is defaulted to NA, or if its parent is explicitely NA, other than querying the parent's hasSpecificValue. But back to the original question, I did some experimenting. I see that when an obj-attr value is currently either inherited or defaulted, (that is is appears to have a value but hasSpecificValue returns false), that the obj-attr GUI screen indeed has an 'Inherited' check box selected and the value box is greyed out. It looks like that even when the value is indeed Defaulted. In the GUI, you must uncheck that box before you can edit the value. Odd. That check box is a feature of that GUI dialog and not a feature of the obj-attr value (that is, the person who wrote the obj-attr edit dialog box code came up with the check box, not the person who designed the underlying data). In DXL you can simply assign the obj-attr a non-null value (obj.NameAttr = "A") in which case it has that value and hasSpecificValue will return false; or you can assign that obj-attr a null value (obj.NameAttr = "") in which case the obj-attr value is subject to being [1] inherited (if AttrDef allows that and when the parent has a value), or [2] if it cannot inherit, then its defaulted (if AttrDef allows that). - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Attribute inherited ... Need Help!
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.