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: Choice Box problems
Topic Summary:
Created On: 13-Aug-2004 15:29
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 Tony Goodman, on Monday, August 16, 2004 8:18 AM

Answer:
You can use the set command as follows

DB db
DBE dbe

string choices[] = {"one", "two"}

string newchoices[] = {"one", "two", "three"}

void doChoices(DB db)
{
set(dbe, newchoices)
}

db = create("")

dbe = choice(db, "choices", choices, 0)
apply(db, doChoices)
show db

Didn't read your question properly!
To dynamically add choices you may want to use insert() as follows

insert(dbe, noElems(dbe), "New Choice")



 13-Aug-2004 15:29
User is offline View Users Profile Print this message


Anthony Ridding

Posts: 5
Joined: 22-Jun-2004


I am trying to dynamically add an entry to the end of a Standard Choice box.

Initially I fill the Choicebox from doors, and display the information. In the course of the application the user can add new entry via a DXL form, I however have not been able to find a way to add this new information to the Choice Box short of destroying the DXL form and recreating it.

Is this even possible under doors ?
Report this to a Moderator Report this to a Moderator
 13-Aug-2004 15:44
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer Answer
You can use the set command as follows

DB db
DBE dbe

string choices[] = {"one", "two"}

string newchoices[] = {"one", "two", "three"}

void doChoices(DB db)
{
set(dbe, newchoices)
}

db = create("")

dbe = choice(db, "choices", choices, 0)
apply(db, doChoices)
show db

Didn't read your question properly!
To dynamically add choices you may want to use insert() as follows

insert(dbe, noElems(dbe), "New Choice")





-------------------------
Tony Goodman
http://www.smartdxl.com

Edited: 13-Aug-2004 at 15:50 by Tony Goodman
Report this to a Moderator Report this to a Moderator
 16-Aug-2004 08:19
User is offline View Users Profile Print this message


Anthony Ridding

Posts: 5
Joined: 22-Jun-2004

Thanks, seemed that there had to be away to do this
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.