![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: DB Callback function ignores current folder Topic Summary: How to get callback function to reset the "current" assignment Created On: 28-Mar-2006 04:20 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Paul, you could try using the following: Item itm = getSelectedItem() You will then need to check if this is a folder, if its open etc etc... Unforunately this is not the same as "current" because the item may be selected in the list view and therefore not be open. getSelectedItem returns a handle on the item that is currently selected in the database explorer tree or list view. It is not a perm, but is defined in dbExplorerGlobals.inc. | |
![]() |
|
Hi,
I have script that uses a Top Most DB to display a list of modules in the current folder - works fine when the DB is first opened. If the user leaves the DB open and selects another folder in the DOORS Explorer, when the user selects a refresh button that triggers a callback, it seems to be stuck on whatever the current folder was at the time the DB was first created. How can I get a callback to respond to whatever the current folder is in the DOORS Explorer? Code segment below demonstrates the problem where the initialisation of the Folder variable "f" in function "doRun" seems to get locked on whatever the current folder was during the first run through of this function - subsequent callbacks to function "doRun" do not refresh to the current folder w.r.t. the DOORS Explorer. DB runAllDB = null DBE reportBox = null void doRun(DB db) { Folder f = current string folderName folderName = name(f) set(reportBox,folderName) } runAllDB = topMost("Display Current Folder") reportBox = text(runAllDB, "Report:", "", 450, 100, false) left(runAllDB) btnRun = apply(runAllDB, "Refresh", doRun) show(runAllDB) ------------------------- Paul Miller Specification Practices Specialist, EuroCyber, Melbourne, Australia. Mobile: +61 (0)418 135 103 Web Site: http://www.eurocyber.biz E-mail: miller@eurocyber.biz">pmiller@eurocyber.biz |
|
![]() |
|
![]() |
|
Paul,
you could try using the following: Item itm = getSelectedItem() You will then need to check if this is a folder, if its open etc etc... Unforunately this is not the same as "current" because the item may be selected in the list view and therefore not be open. getSelectedItem returns a handle on the item that is currently selected in the database explorer tree or list view. It is not a perm, but is defined in dbExplorerGlobals.inc. ------------------------- Tony Goodman http://www.smartdxl.com Edited: 28-Mar-2006 at 11:25 by Tony Goodman |
|
![]() |
|
![]() |
|
Hi,
following modified code will work for the mentioned problem. Greetings... Rony string getCurrentFolder() { OleAutoObj objDOORS = oleGetAutoObject("DOORS.Application") OleAutoArgs autoArgs = create() string strCurFolderName = "" string str = "" clear(autoArgs) put (autoArgs, "strCurFolderName = name(current Folder); oleSetResult(strCurFolderName)") oleMethod(objDOORS,"runStr", autoArgs, str) strCurFolderName = oleGetResult() delete (autoArgs) return strCurFolderName } DBE reportBox = null void doRun(DB db) { string folderName = getCurrentFolder set(reportBox, folderName) } runAllDB = topMost("Display current Fodler") reportBox = text(runAllDB, "Report:", "", 450, 100, false) left(runAllDB) btnRun = apply(runAllDB, "Refresh", doRun) show(runAllDB) ====================== Iftakher Uddin (Rony) Iftakher.Uddin@HOOD-Group.com Edited: 29-Mar-2006 at 14:49 by Iftakher Uddin |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
DB Callback function ignores current folder
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.