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: Using values set in list on a canvas
Topic Summary: How do I capture the selection in a list from one canvas and have it show up in a subsequent canvas?
Created On: 28-Aug-2008 12:48
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 David Pechacek, on Thursday, August 28, 2008 6:11 PM

Answer:
In your callback for the "Next" button, get the selected value of the list and set it to be the text of the field in the 2nd dialog box.

void nextButtonCallback(DBE clicked) {
string selectedValue = get(yourlist_DBE);
set(yourField_DBE, selectedValue);
hide(first_DB);
destroy(first_DB);
first_DB = null;
realize(second_DB);
show(second_DB);
}
 28-Aug-2008 12:48
User is offline View Users Profile Print this message


Heather Linsk

Posts: 50
Joined: 7-Mar-2006

I have a script that displays multiple canvas based dialogue boxed to walk users through a particular process.

One of the canvas pages has a list on it - where the user needs to select one option from that list.

I want to display the option they chose on a subsequent canvas in a text field.
I have the call-back function that sets the attribute I am trying to display on the next canvas - however the value from the list doesn't show up because the canvas has already been painted.

How do I refresh the canvas before displaying it?

Thanks!!

Heather

-------------------------
Heather Linsk
Lead Engineer
General Dynamics AIS
413-494-7095
Report this to a Moderator Report this to a Moderator
 28-Aug-2008 15:50
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

You have one dialog box with multiple canvases or multiple dialog boxes each with a canvas? How do you have a list inside a canvas? Unless you're manually drawing it and determining where the mouse is clicked to see which option is selected. Or you have a list above a canvas in one of the dialog boxes. Same with the text field.

If you really mean to redraw the canvas, your repaint function for the canvas should draw it (nothing appears the first time because the desired string is empty). You could call the repaint function after the item in the list is selected.

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


Heather Linsk

Posts: 50
Joined: 7-Mar-2006

I have one dialog box with multiple canvases.

The list and text field are in a frame below the canvas on separate dialogue boxes.

I have a callback function on the dialogue box that contains the list to get the value selected in the list.

the user then clicks on the "Next" button on my dialogue box and another dialogue box appears. I want to display the value selected in the first dialogue box on the second dialogue box in the default text of a text field.

-------------------------
Heather Linsk
Lead Engineer
General Dynamics AIS
413-494-7095
Report this to a Moderator Report this to a Moderator
 28-Aug-2008 17:31
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Answer Answer
In your callback for the "Next" button, get the selected value of the list and set it to be the text of the field in the 2nd dialog box.

void nextButtonCallback(DBE clicked) {
string selectedValue = get(yourlist_DBE);
set(yourField_DBE, selectedValue);
hide(first_DB);
destroy(first_DB);
first_DB = null;
realize(second_DB);
show(second_DB);
}

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


Heather Linsk

Posts: 50
Joined: 7-Mar-2006

Thank you. I forgot to set the DBE item on the second dialogue after getting the value from the list on the first dialogue.

-------------------------
Heather Linsk
Lead Engineer
General Dynamics AIS
413-494-7095
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.