![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: get current user name Topic Summary: Created On: 20-Mar-2003 17:19 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() 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 | |
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
get current user name
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.