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: Trace the selected item in a list box to the module
Topic Summary: How can this be done?
Created On: 29-Aug-2008 17: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.
 29-Aug-2008 17:25
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Hi All,

I am working on a process that shows object headings in a list box. When I select an object heading, all the objects' text (requirements) under this heading is displayed in a second list box. I worked out that part of the script.

What I want is the following:
When I select a requirement (object text) in the second list box, I want the script to assign a specified enumerated value to one of the attributes of this object in the module.
One way would be to read the object identifier along with the object text, extract the object identifier from it, and then trace it back to the module. But there could be a simpler way of doing it.

Can anyone suggest how I go about it?

- Krishna
Report this to a Moderator Report this to a Moderator
 29-Aug-2008 21:18
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

When you add the items to the list add them also to a skip list

put(ListSkip, i, o)

where i is the integer storing the position in the skip list and o is the corresponding object.

Then when you read the list box selected item, you get an integer which you can use to find the object from the skip list.

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/
Report this to a Moderator Report this to a Moderator
 2-Sep-2008 18:46
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Thanks, Pekka, for the suggestion. In fact I am already using the skip list in the form you suggested, to display the headings in the lsit in the (reverse) order they appear in the module.
Can we provide horizontal scroll bars for the list? Some requirement text is overflowing the width of the list and either a CR function or horizontal scroll bar will make the whole text readable.

- Krishna
Report this to a Moderator Report this to a Moderator
 3-Sep-2008 08:41
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

Hi,

If you use a listView DBE instead of a list DBE then you can add multiple columns which are all individually sizeable upon creation and then resizable by the user once up and running.

listViews are a little more complex than normal lists. see DBE listView in the Dxl reference manual. Before any values are added to the listview, use insertColumn (after you have realised you dialog box). Add rows to the listView using insert, update listview columns using the set(DBE, row, column, (icon|string)) command, and when you want to read the value, use getColumnValue instead of just get. Callbacks are different too, use set(DBE, click, deselect, double-click) to set the callbacks (each function must take a DBE and int parameter) or use set(DBE, checked) to capture the event of the tick box being pressed (where checked is another function with a DBE and int parameter).

listViews also alow drag and drop between other listViews or treeViews for more complex dialog boxes. Its all in the DXL reference manual.

As for CR, there is no way to use CR in either a list or listView unless you manaually break the requirement text up and insert it as separate line items in your list. Would look really messy though and would make things like sort and selection tricky to handle.

Hope this helps,

Paul
Report this to a Moderator Report this to a Moderator
 9-Sep-2008 00:10
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Hi Paul,

Thanks for the tip about the listView. Since I wanted only one column listing all the requirement text, I created a single column listView. I am collecting the object text of selected objects in a skip list and then inserting the object text in the list view. I selected the column width sufficiently long to display the entire string of the object text. This created longitudinal scroll bars.
When I insert the object text from the skip list to the rows of listView, if the string is long, the display in the listView is getting truncated. However, if I print the same text in the output box, the entire text is being displayed. Is there any limitation of the string that can be displayed in a row of the listView? The column is quite wide - I can see a lot of blank space after the truncated string.

- Krishna
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.