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: Deleted columns in views
Topic Summary: How to capture the columns of deleted attributes in view?
Created On: 30-May-2007 04:17
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.
 30-May-2007 04:17
User is offline View Users Profile Print this message


Rhea Castillo

Posts: 11
Joined: 7-May-2007

I need to create a script that looks through the views in a module and checks if there are columns that are deleted or not. Is there a way to capture the deleted columns?

when i attempted to load the view with some deleted attribute columns, i get a run-time error. How can i capture this?



Edited: 30-May-2007 at 04:21 by Rhea Castillo
Report this to a Moderator Report this to a Moderator
 30-May-2007 07:14
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Rea,

did you tried to use
void noError()
....
string lastError()
arround your code? That should capture all runtime errors thrown by loading the view?!

Greetings
Reik

P.S.: If you like to, you may see the error messages in the result of lastError.

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 30-May-2007 07:48
User is offline View Users Profile Print this message


Rhea Castillo

Posts: 11
Joined: 7-May-2007

Hi Reik:


Yes i did use the noError and lastError message but somehow it still pops up a window saying "DXL halted with run-time error". I don't want a window to pop up.. From my understanding, it should suppress the run-time errors when i use the noError function..

here is code snippet:
Module m = read(current Module, true)
View v = view("My_View")
noError
load (m,v)
string errMsg = lastError
if (null errMsg) {
   print "view loaded"
} else {
  print errMsg
}
close(m)


 



Edited: 30-May-2007 at 07:51 by Rhea Castillo
Report this to a Moderator Report this to a Moderator
 30-May-2007 08:05
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Rhea,

was the view really not loaded, or was it loaded but contains columns with "Error in DXL code!" in it?
It seems that the error message is generated by layout DXL?!

So if you do not care about the DXL-Error-Window you may be able to check your view anyway?

Unfortunately I have no other idea that may help you, sorry.

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 30-May-2007 08:14
User is offline View Users Profile Print this message


Rhea Castillo

Posts: 11
Joined: 7-May-2007

hi:

The view is loaded but there are columns with "Error in DXL"..

I'm sortof a newbie with regards to the layout DXL..
Report this to a Moderator Report this to a Moderator
 30-May-2007 08:23
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Rhea,

I don't know, what you would like to see or change in the loaded view, but you can ignore the error messages in DXL-Window.
They are generated by the layout DXL script that runs in the column showing "Error in DXL".
If you like to, you may see the running code by using
string dxl (Column)
or in GUI by choosing properties of that column and click on Browse button near the Layout DXL radio button. Then in new window click on Current and you will see the code.

The layout DXL is usual DXL code with two additional things:
Object obj is the object on which the code is currently running and
display(string) and displayRich(string) will show the results in that column like the print command for DXL-Window.

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 30-May-2007 10:17
User is offline View Users Profile Print this message


Rhea Castillo

Posts: 11
Joined: 7-May-2007

Ok, im trying out what you have said.

Actually i just want to make it straight-forward. if ever the load is to be loaded and there are errors on it, i will just log the name of the view... no need to go into the layout dxl..  That is why i am hoping that lastError would give light to it.. however, it's not captured..
Report this to a Moderator Report this to a Moderator
 30-May-2007 20:12
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

You said it this way but I suspect you didn't intend it: there is no such thing as a 'deleted' column. A column either exists or it doesn't. A view has a list of columns associated with it. If you create a view and then delete one of the attribute's in that view, DOORS internally deletes that attribute column from the view (without your help). If you subsequently re-create that attribute, it does not reappear in the view.

You say you've got layout dxl that generates errors? Yes, I'm struggling right now with that very issue; I'm writing a script to summarize all the projects, folders, and modules and want it to run overnight. Well, some bozo's have default views that are bad and the script hangs up waiting for me to ack.

Putting noError lastError around the open-module command or around the load view command seems to trap the routine 'dxl errors' such as mistyping 'elsxe', but it doesn't trap the real errors where the code has an include file that you cannot see from your client. I believe I'll try putting the open module or load view command inside a string and send it for 'eval_', where I expect to trap the errors, but we'll see.

There is also some chance that defining an overloaded 'ack' or 'warningBox' may help, as attached.

- Louie
Report this to a Moderator Report this to a Moderator
 31-May-2007 10:22
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I have found a way to get round this problem of default views containing bad layout dxl.

noError...lastError works in suppressing errors when loading a view after the module is open, but it does not work when opening the module and a default view is loaded. I don't know why :-(

The script scans the module for bad layout dxl and reports the view and column containing the errors.

It does the following:

1. open the module in the background (no views loaded) and get the default views for the user and module.

2. clear these defaults so that the module will open in standard view.

3. open module visible.

4. loop through views.

for each column in view, check for layout dxl.
if there is some dxl, check it
if the dxl is bad report the column title.

5. finally, restore the default views.

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

Edited: 31-May-2007 at 10:59 by Tony Goodman
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.