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: get current user name
Topic Summary:
Created On: 20-Mar-2003 17:19
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 Judith Underwood, on Friday, March 21, 2003 2:59 PM

Answer:
Try
User u = find()
string sName = u.name
print sName

Looks like the get(User,property) form is for user-defined properties, eg.

User u = find()
set(u, "myAttribute", "myValue")

string sName = get(u,"myAttribute")
print sName // prints "myValue"

Judith
 20-Mar-2003 17:19
User is offline View Users Profile Print this message


Mark Phillips

Posts: 40
Joined: 17-Dec-2002

I am wanting to get the name (and other) information about the current user. I have tried the following:

User u = find()
string sName = get(u,"name")
print sName

and get a runtime error of:

User/Group directory error: No such attribute name

Any suggestions?

Mark

PS The documentation on the get function in the DXL reference manual (v. 6) appears to be incorrect (hopefully) in its last sentence - "If successful, returns a null string; otherwise, returns an error message."

-------------------------
Mark Phillips
mark.phillips@swri.org
Report this to a Moderator Report this to a Moderator
 21-Mar-2003 11:49
User is offline View Users Profile Print this message


Judith Underwood

Posts: 35
Joined: 25-Sep-2002

Answer Answer
Try
User u = find()
string sName = u.name
print sName

Looks like the get(User,property) form is for user-defined properties, eg.

User u = find()
set(u, "myAttribute", "myValue")

string sName = get(u,"myAttribute")
print sName // prints "myValue"

Judith
Report this to a Moderator Report this to a Moderator
 21-Mar-2003 15:04
User is offline View Users Profile Print this message


Mark Phillips

Posts: 40
Joined: 17-Dec-2002

The funny thing is I though I had tried this (actually the first thing I tried), but I used:

User u = find()
print u.name

and it bombed.

I even tried "print (u.name)" and "print (string u.name)" and "print (u.name "")" without getting the proper results...

Thanks for the help,

Mark

-------------------------
Mark Phillips
mark.phillips@swri.org
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 1 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.