![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Incorrectly Concatenated Tokens??? Topic Summary: Created On: 25-Jun-2003 04:44 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() 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. | |
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 1 ![]() } } regards ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Incorrectly Concatenated Tokens???
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.