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: Problem with dateOf(Baseline b)
Topic Summary: Returning current date
Created On: 27-Aug-2007 18:11
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 Wednesday, August 29, 2007 3:22 PM

Answer:
As Lou and Kevin say, you can only get that info with a "for baseline in module" loop.
 27-Aug-2007 18:11
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I've got an object history script (modified version of Michael Sutherland's) and when I put the Baseline number and date in the list view, I'm getting the current date for every baseline. I get a handle to the baseline using

Baseline b = baseline(major, minor, suffix)

Then get the date with dateOf(b). The only things in between is checking if the baseline is already open, opening if it is not, and passing b to another method that takes it as a parameter. "b" doesn't get modified though.

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


Kevin Murphy

Posts: 206
Joined: 15-Jul-2005

David,

Without seeing your code this is impossible to troubleshoot. Are you using a for baseline in module loop? It doesn't sound like you are, and thus, b is not getting updated.

Post your code, though, and we'll be able to help you more.

Kevin

-------------------------
Kevin Murphy
http://www.baselinesinc.com
The Requirements Management Experts
Report this to a Moderator Report this to a Moderator
 27-Aug-2007 19:20
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

No I'm not getting the baseline with a baseline in module loop. I'm manually loading each baseline with Baseline b = baseline(int major, int minor, string suffix). I notice in the DXL manual it says to use commands like dateOf(Baseline b), you have to use it in such a loop. I guess loading the baseline manually doesn't get the proper information.

So I added another Skip that holds the creation dates for the baselines.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 27-Aug-2007 23:49
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Understand you can get a baseline handle with Baseline b = baseline(major, minor, suffix) even when there is no such baseline in the module. Try this code from an open module:
Baseline b = baseline(9,9,"")
print "B is null = " (null b) "\n"

it should come back false.

Not sure what the early DXL folks were thinking when they came up with that.

Yes, use a baseline loop when you are dealing with actual baselines. Be sure you never used nested baseline loops (such as I did when I had a library function with such a loop). To avoid that, stage baselines in a Skip list then loop through the List:
Skip skpBLs = create()
for bl in mod do
{ put (skpBLs, bl, bl)
}
for bl in skpBLs do
{ print major(bl) "." minor(bl) "<" suffix(bl) ">\t" (dateOf(bl)) "\n"
}
delete(skpBLs)

- Louie
Report this to a Moderator Report this to a Moderator
 29-Aug-2007 15:20
User is offline View Users Profile Print this message


Norberto Silva

Posts: 8
Joined: 25-Nov-2002

I got the same problem.

The code look like:

Baseline b = baseline (1, 3, "")

// This returns false every time as the baseline OBJECT is
// instanciated and never NULL. ('cuse spl'ng)
print (null b) "\n"

// This is the command you want if you need to see if the
// baseline is good for the module you have open.
// In this case, returns true if current Module have baseline 1.3.
print baselineExists (current Module, b) "\n"

//Now, the problem is that following code should display
// the date the baseline was frozen. But instead it displays
// todays date.
print (dateOf(b)) "\n"

//[sigh]

However if you put the above code in a loop
(as mentioned by Mr. Landale above)
you get the expected result...

Baseline b
for b in current Module do {
print (dateOf(b)) "\n"
}

So Louie Landale's post is right on the money.
Mark it solved.

Edited: 29-Aug-2007 at 15:31 by Norberto Silva
Report this to a Moderator Report this to a Moderator
 29-Aug-2007 15:22
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Answer Answer
As Lou and Kevin say, you can only get that info with a "for baseline in module" loop.

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


Norberto Silva

Posts: 8
Joined: 25-Nov-2002

[duplicate post]

Edited: 29-Aug-2007 at 15:30 by Norberto Silva
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.