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: Question on dialog boxes
Topic Summary:
Created On: 6-Feb-2008 19: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.
 6-Feb-2008 19:48
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Is there any way to add a DBE to a dialog box after it has been displayed?

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 7-Feb-2008 10:35
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

No.
You have to create all the DBE's up front and use hide() and show().

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 7-Feb-2008 15:42
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

David,
Perhaps your objectives can be accomplished by using inactive and active functions.
Report this to a Moderator Report this to a Moderator
 7-Feb-2008 16:19
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Well my objective is to create a generic dialog box program where users can add and remove dialog box elements for attributes at will.

What I'm thinking is to do an array of 100 DBEs declared initially, assign them all to be labels, and hide them. Then when the user wants to add an element, it will reassign the DBE to the new proper type, place it, and show it.

It's definitely going to be tricky and take some thought. I just hate having some set limit on the total number of DBEs the user can use. But I figure its doubtful they'll use over 100 attributes in one sitting. And even if they add one, remove it, then want it again, I don't have to use up two different ones, I can reuse the first one. I've already got some of it figured out.

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


David Jakad

Posts: 94
Joined: 20-Jul-2007

Does that work? I'm not so sure.

Once the dialog box is "realized" you cannot change a DBE to another type of DBE. Also, you cannot change the positioning of the DBEs in the dialog box. You can only change the contents of the DBEs. For example, you can change the choices in a dropdown, or the text in a richText field. But, you cannot change a field DBE to a text DBE, nor can you move that field DBE to another position. As Tony mentions, you can only hide() and show() elements.

One thing you may be able to do is have a parent DB that spawns child DBs. So, you could create a parent DB in which the user makes some choices, then clicks a button, and have a child DB generated based on the choices in the parent DB.

It would be great if someone created a generic dialog-box-builder tool. I guess that's what you are suggesting. It could all be done in DXL, with a master dialog box in which the user could design a new dialog box, simply by point-and-click rather than having to code it manually with DXL. And, you could potentially even generate and save the new DXL code to a file, which would generate the new DB directly the next time. Although, it wouldn't be trivial to do this.
Report this to a Moderator Report this to a Moderator
 7-Feb-2008 18:35
User is offline View Users Profile Print this message


David Jakad

Posts: 94
Joined: 20-Jul-2007

Sorry, hit the "post" button twice.

Edited: 7-Feb-2008 at 18:37 by David Jakad
Report this to a Moderator Report this to a Moderator
 7-Feb-2008 18:54
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Yeah you're right. Didn't think of that. The master-child idea is good though. Maybe I'll take that approach. This is definitely going to take some work and thought....

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


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Not sure about the parent-child notion, but see no reason why the dialog cannot accept the user's input, remember all the contents of the existing DBEs, hide the current DB and rebuild a new one, using the user's input. If you remember the exact location of the DB then I suspect the user won't notice.

To accomplish that, however, the main 'BuildDialog' function needs to refer to the callback functions, and the callback functions will need to refer to the BuildDialog function. You can accomplish that by pre-defining the BuildDialog, then define the Callbacks, then define the body of BuildDialog; something like attached.

- Louie
Report this to a Moderator Report this to a Moderator
 7-Feb-2008 21:49
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

DOH!

I really wish I'd known that DXL allows you to predefine functions....

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