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: Closing child dialogs...
Topic Summary:
Created On: 24-Feb-2006 11:45
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.
 24-Feb-2006 11:45
User is offline View Users Profile Print this message


Rafal Dudycz

Posts: 13
Joined: 12-Jul-2005

Hi all,

I wondering why DOORS after closing parent dialog box(main DB) dosn't close all child dialogs?

Example:

void foo(DBE dbe)
{
DB parent = getParent(dbe)
DB childDB = create(parent, "Child DB")
realize childDB
}

DB mainDB = create("Main DB")
DBE btn = button(mainDB, "Foo", foo)
realize mainDB

Is there any method to close such childs, without passings/global handles to them?

Regards,
Rafal Dudycz
Report this to a Moderator Report this to a Moderator
 24-Feb-2006 12:34
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Look at functin hide and close
Report this to a Moderator Report this to a Moderator
 24-Feb-2006 13:29
User is offline View Users Profile Print this message


Rafal Dudycz

Posts: 13
Joined: 12-Jul-2005

But it doesn't solve my problem. Or maybe I'm missing something...?

//###########################################
void fooCloseCB(DB db)
{
//some cleanups
hide db
}

void foo(DBE dbe)
{
DB parent = getParent(dbe)
DB childDB = create(parent, "Child DB")
close(childDB, true, fooCloseCB)
realize childDB
}

void closeCB(DB db)
{
//some cleanups
hide db
}

DB mainDB = create("Main DB")
DBE btn = button(mainDB, "Foo", foo)
close(mainDB, true, closeCB)
realize mainDB
//###########################################

All I need is to call close method for child dialog (fooCloseCB), but I have no handle to child window, which needs to be passed...

Is there any method (or loop) to obtain handles to all dialog objects (dbe & db) which are childs of dialog box?

Regards,
Rafal Dudycz
Report this to a Moderator Report this to a Moderator
 24-Feb-2006 15:15
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

During exit close all dialog boxes that are showing. (ie., use the showing function)
Report this to a Moderator Report this to a Moderator
 24-Feb-2006 20:26
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I presume the "parent" dialog script is the one also defining the "chilren" dialogs.

Here's an outline: Have a Skip list that holds the values of child DBs. When a child is created put its DB handle in the Skip. Override the native "close" button on the parent DB with your own Close software using command "close(dbParent, true, applyCloseParent)". Any other button on the parent that closes the dialog (perhaps "OK") needs to call function applyCloseParent before it ends. Function applyCloseParent loops through the Skip list and hides any DB it finds if that DB is "showing".

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