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: Incorrectly Concatenated Tokens???
Topic Summary:
Created On: 25-Jun-2003 04:44
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.
Answer This question was answered by Paul Miller, on Monday, June 30, 2003 6:03 AM

Answer:
Hi Everyone,

Michael Sutherland managed to identify the mistake in my code.

I had already defined a string with the variable name "empty".

When I attempted to use the empty() function to clear the multi-list, the DXL compiler was not able to handle the overload on the use of the name "empty" and my attempt to apply the following line of code "empty attrList" was interpreted as an attempt to concatenate the contents of string variable "empty" with the DBE "attrList" and of course the ensueing compiler error was raised.
 25-Jun-2003 04:44
User is offline View Users Profile Print this message


Paul Miller

Posts: 376
Joined: 2-Oct-2002

Hi,

I have a DBE called "attrList" and this DBE is defined as a multiList.

This multilist is filled out when a user selects an option from another list.

If the user changes the selection, the multilist is filled out again via a callback operation.

On each callback, I need to empty the multiList and re-populate it but DOORS but the DXL compiler raises the error "Incorrectly Concatenated Tokens"

The line of code is quite simple:- empty attrList

Prior to entering this single line of code, the DXL script had no errors.

Page 237 of the DXL Reference shows an example of usage for the "empty" function which I've adopted. I've tried every syntax trick I can think of to no avail. Any clues please?

Paul Miller.
Tenix Specification Practices Project
Tenix Strategy & Development Dept
Nelson House, Nelson Place
Williamstown, Vic, Australia, 3016
Email:
paul.miller@tenix.com


-------------------------
Paul Miller
Specification Practices Specialist,
EuroCyber,
Melbourne, Australia.
Mobile: +61 (0)418 135 103
Web Site: http://www.eurocyber.biz
E-mail: miller@eurocyber.biz">pmiller@eurocyber.biz
Report this to a Moderator Report this to a Moderator
 25-Jun-2003 16:52
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Paul,

Could you post sample code that duplicates the problem? What version of DOORS are you trying this with?

If empty() does not work for a multiList, possible workarounds would be:

(1) Switch to a single-column listView(). I've used empty() on that and have not had a problem.
(2) Delete the list entries one by one (for loop).

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 26-Jun-2003 20:42
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Until we see the code, let me take a stab in the dark...

Is the "DBE attrList" statement above or below the callback containing the "empty attrList" statement? I.E. does it look like:

[1]
DBE attrList
void CallBack(DBE xx)
{ empty attrList
}
attrList = multiList(...)

[2]
void CallBack(DBE xx)
{ empty attrList
}
DBE attrList = multiList(...)

Make it look like [1]

- Louie
Report this to a Moderator Report this to a Moderator
 26-Jun-2003 21:47
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Louie,

Good guess, but no. Paul sent the code to me, and the problem is now solved. I wouldn't have been able to solve it without seeing how he had it coded.

I'll leave it up to Paul to post the details of the issue (if he chooses to).

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 27-Jun-2003 14:08
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

So the answer is here for everyone...

You can't use empty() on a multiList.
I always use the following function:

void emptyDbeList(DBE dbeList)
{
int n = noElems dbeList
if ( n > 0 )
{
int i
for i in 1noElems dbeList) do delete(dbeList, 0)
}
}

regards

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 27-Jun-2003 20:01
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Tony,

I beg to differ. The empty() function does work on a multiList dialog box element. The attached code demonstrates this.

Do you have a specific scenario where you found a problem with it? If so, can you post a counter example?

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 27-Jun-2003 20:45
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Tony,

My example works in DOORS 6.0 SR1. I didn't try it in earlier versions of DOORS yet. Perhaps this is part of the issue?

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 30-Jun-2003 06:03
User is offline View Users Profile Print this message


Paul Miller

Posts: 376
Joined: 2-Oct-2002

Answer Answer
Hi Everyone,

Michael Sutherland managed to identify the mistake in my code.

I had already defined a string with the variable name "empty".

When I attempted to use the empty() function to clear the multi-list, the DXL compiler was not able to handle the overload on the use of the name "empty" and my attempt to apply the following line of code "empty attrList" was interpreted as an attempt to concatenate the contents of string variable "empty" with the DBE "attrList" and of course the ensueing compiler error was raised.


-------------------------
Paul Miller
Specification Practices Specialist,
EuroCyber,
Melbourne, Australia.
Mobile: +61 (0)418 135 103
Web Site: http://www.eurocyber.biz
E-mail: miller@eurocyber.biz">pmiller@eurocyber.biz
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.