Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: DXL Attribute: undeclared variable
Topic Summary:
Created On: 2-Sep-2004 09:25
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 2-Sep-2004 09:25
User is offline View Users Profile Print this message


Frank Held

Posts: 14
Joined: 16-Jul-2004

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
Report this to a Moderator Report this to a Moderator
 2-Sep-2004 14:49
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 3-Sep-2004 16:53
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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

Report this to a Moderator Report this to a Moderator
 6-Sep-2004 09:39
User is offline View Users Profile Print this message


Frank Held

Posts: 14
Joined: 16-Jul-2004

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
Report this to a Moderator Report this to a Moderator
 6-Sep-2004 11:49
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.