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: How to write find function in listview
Topic Summary: find function
Created On: 22-Aug-2008 20:15
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.
 22-Aug-2008 20:15
User is offline View Users Profile Print this message


Faisal Zahidi

Posts: 8
Joined: 26-May-2004

I want to find a string in the list view. if the string is not found, i want to insert the string at the end of the listview.
how to do it?

faisal 714.296.2533
faisal.zahidi@boeing.com
Report this to a Moderator Report this to a Moderator
 25-Aug-2008 13:12
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Your problem is that you're trying to use the find function on a string value. find() is for Skip Lists.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 25-Aug-2008 18:27
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

You'll need to store the strings in the listView in a skip list. Then search the skip list and if its not in there, its not in the listView. So then add it to the end with insert command using the noElems() function to get the next index in the listView to use as the "int row" arguement.

You can write a refresh function that will handle refreshing the listView whenever you add or remove a string in the skip list.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.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.