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: Set selected value in choice DBE
Topic Summary:
Created On: 14-Sep-2006 17:16
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 Dennis Lockshine, on Thursday, September 14, 2006 8:21 PM

Answer:
The attached code snippet contains a function which will allow you to specify a DBE Choice element and string value, it will parse the list, and if the value is found it will set the selection and return true. If the selection is not found, the function call will return false. If you call this function on a non-compatible DBE element, it will produce a run-time error.

<element> is the Choice DBE element, and <value> is the string value you wish to set.

-Dennis
 14-Sep-2006 17:16
User is offline View Users Profile Print this message


Brian Abts

Posts: 7
Joined: 3-May-2006

Is there a set method that will select a specific value in a choice DBE?

I want to be able to have a callback function that automatically selects a value in a choice drop-down list. I notice there's a set function that will do this for a list DBE, but it doesn't seem to work for choice DBEs.

Thanks.

- Brian

-------------------------

Brian Abts
Software Engineer I
AAI Corp.
Report this to a Moderator Report this to a Moderator
 14-Sep-2006 19:54
User is offline View Users Profile Print this message


Dennis Lockshine

Posts: 113
Joined: 7-Apr-2003

Answer Answer
The attached code snippet contains a function which will allow you to specify a DBE Choice element and string value, it will parse the list, and if the value is found it will set the selection and return true. If the selection is not found, the function call will return false. If you call this function on a non-compatible DBE element, it will produce a run-time error.

<element> is the Choice DBE element, and <value> is the string value you wish to set.

-Dennis
Report this to a Moderator Report this to a Moderator
 14-Sep-2006 20:24
User is offline View Users Profile Print this message


Brian Abts

Posts: 7
Joined: 3-May-2006

Ah! I missed set(dbe choice, int index) in the DXL reference guide. Your code just made me check the guide again and then I found it on page 420. I feel silly now.

Thanks for the help!

-------------------------

Brian Abts
Software Engineer I
AAI Corp.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.