Hi,
I am trying to make a dialog box in order to set a default directory where I store my database (which the program will load), graphs and other stuff (which the program makes). The code I am using is the following:
%directory = "path_name"
@uiedit(%directory, "Directory:")
cd {%mode}
However, once the dialog box opens the path name stops at a "space" in the path_name. My ultimate purpose is to make my program user-friendly, thus for people who do not have any knowledge on programming not to face this little issues. Could this be overcome?
PS, I also tried with
string directory = "path_name"
@uiedit(directory, "Directory:")
cd {%mode}
but it shows an error message saying "No workfile exists...use NEW or OPEN"... however I am not working with a workfile, since my program is creating it
Thanks in advance.
LR
Directory dialog box
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Directory dialog box
Code: Select all
%directory = "path_name"
@uiedit(%directory, "Directory:")
cd %directory
Re: Directory dialog box
Hi Gareth,
I miss-spelled the code in the first message. What I actually first tried was what you suggest, and it doesn't work. The box recognizes only a part of the path. That's what my question was about.
Thanks again in advance
I miss-spelled the code in the first message. What I actually first tried was what you suggest, and it doesn't work. The box recognizes only a part of the path. That's what my question was about.
Thanks again in advance
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Directory dialog box
Hi Gareth,
as I mentioned above: the box recognizes only a part of the path (i.e. instead of showing ALL the path, it only shows A THIRD of it). Your link only shows what I already read from the command and programming reference, so it does not really answer my question
as I mentioned above: the box recognizes only a part of the path (i.e. instead of showing ALL the path, it only shows A THIRD of it). Your link only shows what I already read from the command and programming reference, so it does not really answer my question
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Directory dialog box
You mentioned that it stops at a "space". My example shows that a space works fine. I guess I don't understand what the issue is exactly. Perhaps you could provide more concrete details?
Re: Directory dialog box
The issue is that I type
%directory = "C:\Documents and Settings\Fahi_2\My Documents\..."
@uiedit(%directory, "Directory:")
cd %directory
(the three dots at the end of the path are only to show that the path goes on)
Once the box appears, what I see is only
C:\Documents and Settings\Fahi_2\My
and I cannot type anymore
there are two spaces in "Documents and Settings", so I do not think this would be the problem. Perhaps the problem is the size of the box? I could create a folder near C:\, but that would not help other users who would potentially want to save the tables and graphs in a folder of their choice.
Again, thank you for your advice
%directory = "C:\Documents and Settings\Fahi_2\My Documents\..."
@uiedit(%directory, "Directory:")
cd %directory
(the three dots at the end of the path are only to show that the path goes on)
Once the box appears, what I see is only
C:\Documents and Settings\Fahi_2\My
and I cannot type anymore
there are two spaces in "Documents and Settings", so I do not think this would be the problem. Perhaps the problem is the size of the box? I could create a folder near C:\, but that would not help other users who would potentially want to save the tables and graphs in a folder of their choice.
Again, thank you for your advice
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Directory dialog box
Change the size of your edit box. 1024 is probably enough.
Code: Select all
%directory = "C:\Documents and Settings\Fahi_2\My Documents\..."
@uiedit(%directory, "Directory:", 1024)
cd %directory
Re: Directory dialog box
Awesome, thank you!
Who is online
Users browsing this forum: No registered users and 2 guests
