![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Need DOORS DXL Basic Help Topic Summary: Need DOORS DXL Basic Help Created On: 21-Feb-2007 21:44 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
What's wrong with this code?? I get an error: "Incorrect arguments for function print." I simply want to print object."Attribute Name" Object oSelect = null for oSelect in m do { print oSelect."Object Heading" } |
|
![]() |
|
![]() |
|
There's the error...
-E- DXL:
|
|
![]() |
|
![]() |
|
Change oSelect."Object Heading"
to oSelect."Object Heading" "" |
|
![]() |
|
![]() |
|
The construct <oSelect."Object Heading"> is of type "AttrRef_" and is not a string. If you assign an AttrRef_ to a string variable, DOORS knows to extract the value from the obj-attr. See the section " Assignment (from attribute)" in the DXL manual chapter 'Attributes'. If you concatenante an AttrRef_ with a string, DOORS knows to extract the attr value and concatenate that.
string s = obj.NameAttr // works. Attr value is extracted and assigned. o1 = o2.NameAttr "" // works. Attr value is extracted and converted to a string, then assigned. o1 = o2.NameAttr // fails. You cannnot assigne AttrRef_ variable to an 'Object'. However, the print command must take a string. So you need to force extraction of the attr value by concatenation with a string: print oSelect."Object Heading" "" // Concatenante with two double quotes is common. Also... if (oSelect."IsReq") // fails. If demands a 'boolean' not an AttrRef_ variable. if (oSelect."IsReq" == "True") // fails. Cannot compare an AttrRef_ with a string. if (oSelect."IsReq" "" == "True") // works. Value is extracted and compared to True - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Need DOORS DXL Basic Help
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.