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: Error with multiList initialisation
Topic Summary:
Created On: 13-Feb-2007 15:22
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.
 13-Feb-2007 15:22
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

When the multilists are initialised using string arrays declared locally within a function, the first multilist displays the incorrect data.
If these string arrays (stringsA and stringsB) are declared globally, the problem does not manifest itself.

Also, notice in the example that listA displays only the first 3 values of listB, not all of them.

If the string arrays are declared globally, or in the same function, this issue does not arise.

Telelogic have looged this as a defect with case ID SH1053063 for both DOORS 7.1 and 8.

Example code demonstrates this.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 13-Feb-2007 23:39
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I added a multi-list using a global defined vector, and yes it works.

Notice what happens with the insertion of code into createB: the first entry gets messed up differently depending on whether you define XX or not.

I suspect that the multi-list is actually constructed when 'realize' is called, and if so the local string vectors are no longer defined. I suspect that the vector constants are defined relative to the start of the function on the stack, and since the functions aren't defined when Realize is called that you just get whatever garbage is left in the stack.

That is, multi-list remembers "vector starting 3 positions from Stack" when its a local vector, but remembers "vector starting 123 positions from start of DXL" when its a globally defined vector.

Thats sort of like inserting a Buffer into a Skip list, deleting the Buffer, then attempting to retrieve it from the Skip.

- Louie
Report this to a Moderator Report this to a Moderator
 2-Apr-2007 21:50
User is offline View Users Profile Print this message


Douglas Zawacki

Posts: 58
Joined: 17-Oct-2006

While it seems like a bug, I would agree with Louie's opinion. It seems that the string arrays in createA and createB are local to to each function. Therefore if you are trying to meet your objective without declaring global string arrays, you  may be more willing to try the code I have attached.

Basically, my thinking is that I always populate my list boxes ( I almost always use listView elements)AFTER realizing the Dialog box because I usually add columns into the list boxes. You can only add columns in the list boxes after realizing the Dialog box.



Hope this helps.
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.