![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: With "fileName" is it possible to pick directory only? Topic Summary: Created On: 4-Dec-2006 17:07 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Pete. look at http://www.smartdxl.com/directoryname.html | |
![]() |
|
The attached code shall produce a GUI that allows a user to browse the file system. In the field, the user is able to type in a file name.
My question is can the fileName function be modifed somehow that will only allow a user to select a directory by clicking on the Browse button and not allowing him to type anything in the field? What I am trying to accomplish is make a report tool of mine more dummy proof by only allowing the user select the directory where the report shall be written to. Thanks for any tips. ------------------------- pete.kowalski(at)motorola.com |
|
![]() |
|
![]() |
|
I don't think that you can get your desired behaviour with the fileName function.
However, you can put your desired filename into the field and, when the user has selected a directory, throw away the filename at the end of the path and put your desired on back on again. Basically, ignore any changes to the filename that the user may have made...it would probably be a good idea to inform them that your script is going to do this. Here's an example, using a regexp to extract the path from the filename... |
|
![]() |
|
![]() |
|
Pete. look at
http://www.smartdxl.com/directoryname.html ------------------------- Pekka.Makinen@softqa.fi SoftQA Oy -http://www.softqa.fi/ Edited: 5-Dec-2006 at 06:33 by Pekka Mäkinen |
|
![]() |
|
![]() |
|
Antonio,
Thanks for sharing your code. It is very useful on another DXL hack. ------------------------- pete.kowalski(at)motorola.com |
|
![]() |
|
![]() |
|
The code found at Pekka's link (smartdxl.com) works great with one small exception: when one opens the directory browser then closes it (using the OK or Close buttons), then the original GUI ends up in the back ground.
Edited: 24-Apr-2007 at 01:01 by jason haury |
|
![]() |
|
![]() |
|
My apologies - there were bugs in the code.
I have amended the code on the website to fix these issues. ------------------------- Tony Goodman http://www.smartdxl.com Edited: 24-Apr-2007 at 14:03 by Tony Goodman |
|
![]() |
|
![]() |
|
Perfect! Thanks!
|
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.