![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: DXL Attribute: undeclared variable Topic Summary: Created On: 2-Sep-2004 09:25 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I have a DXL Attribute with this Code:
#include </addins/scripts/getvalue.dxl> obj.attrDXLName = getvalue (obj, "Status") and the getvalue.dxl file: string getvalue(Object ob, string _Attribut) { Link lnk Object otgt string value ... //skipped some unimportant lines to keep the posting clear, the essential loc are shown int l = length(_Attribut) for lnk in ob -> "*" do { //there is only one outgoing link ... otgt = target(lnk) value = otgt._Attribut ... } return value } After I have logged into Doors and open the module for the first time i get the errors and there are no values displayed in DXL Attribut column. -E- DXL: </addins/scripts/getvalue.dxl:1> syntax error Included from: <Line:1> -E- DXL: </addins/scripts/getvalue.dxl:7> undeclared variable (_Attribut) Included from: <Line:1> -E- DXL: </addins/scriptscripts/getvalue.dxl:10> incorrect arguments for (-> ![]() Included from: <Line:1> -E- DXL: </addins/scripts/getvalue.dxl:10> undeclared variable (ob) Included from: <Line:1> ... When I close the module and reopen it are no errors displayed and the column/attribute is filled. Why occurs this error and how can I solve the problem? Thanks ------------------------- Frank |
|
![]() |
|
![]() |
|
The interpreter does not like identifiers starting with the underscore character.
Why it works after the module is opened I do not know. ------------------------- Tony Goodman http://www.smartdxl.com Edited: 2-Sep-2004 at 14:50 by Tony Goodman |
|
![]() |
|
![]() |
|
That first error means your _Attribut to be undefined and will auto-cause the other errors. Don't know about that leading underscore; don't know why it minds the first time but not the second.
Intuitively without evidence I would not be surprised that these link loops don't work quite right before the module, and the other module, has had time to open. It works the second time because the other module is now open. Try two things: 1 string Value = "" 2 Change _Attribut to something else, maybe NameAttr - Louie |
|
![]() |
|
![]() |
|
I changed both, underscore and initialisation of value, but nothing changed.
BTW I got another curious Doors behaviour. After changing the getvalue.dxl file doors displayed still the old attributname _Attribut in the errormessage and even after deleting the getvalue.dxl file doors executed the old script. Next morning Doors realized that there is no skript. Does Doors cache the user defined skripts or what else? ------------------------- Frank |
|
![]() |
|
![]() |
|
I have experienced similar behaviour, where I have edited or even deleted a script and DOORS still seems to be using the original version.
In my case, this was due to fact that I had a duplicate script file of the same name in another folder. The path to this other folder had been unwittingly added to the search path by use of the fileName explorer. This has been reported to DOORS support, under case number SS4009765. The following is a copy of my original email. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
DXL Attribute: undeclared variable
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.