Home » Developer & Programmer » Forms » Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory
Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #254045] Wed, 25 July 2007 11:01 Go to next message
REDALERT
Messages: 7
Registered: July 2007
Junior Member
Hi everyone,

I have a problem when using "webutil_file.DIRECTORY_SELECTION_DIALOG". I am unable to select the root directory of a disk (ex.: c:\,d:\,etc..)
I can select any sub-directory but I can't select the main directory.

Here is the syntax I use:
:Parametre.Target_dir := webutil_file.DIRECTORY_SELECTION_DIALOG('C:\WINDOWS\TEMP','Target directory');

We use Web_util 1.0.5 with Forms 9.0.4 on Windows.

Question: Is it possible to select the root with that? If yes, what am I doing wrong? If not, any idea about the way to do that using something else ?
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #255169 is a reply to message #254045] Mon, 30 July 2007 23:02 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
What happens if you use:
:Parametre.Target_dir := webutil_file.DIRECTORY_SELECTION_DIALOG('C:\','Target directory');

David
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #255659 is a reply to message #255169] Wed, 01 August 2007 07:29 Go to previous messageGo to next message
REDALERT
Messages: 7
Registered: July 2007
Junior Member
Hi David,

If I use c:\, I can see all subdirectories under c:\. I can select one of those subdirectories, but, I am still unable to select c:\ (the main directory) as target directory...

Thank you for taking time to reply...
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #256066 is a reply to message #255659] Thu, 02 August 2007 21:33 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
When you say "I am still unable to select c:\" is it because the 'button' is not active when you point at 'c:\' or is it because 'c:\' is not presented to you?

Have you considered letting the user select ANY item and then using a substr to get the drive name?

David
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #256251 is a reply to message #256066] Fri, 03 August 2007 10:21 Go to previous messageGo to next message
REDALERT
Messages: 7
Registered: July 2007
Junior Member
Hi David,

I've uploaded a print screen of what I got.

What I want to do is to, from an Oracle Forms screen, let a user produce an extraction file and save a file (fixed filename GESTR603.TXT) in the directory he choose (using webutil). The filename is always the same but I want them to be able to choose the directory.

This works fine except when user want to use the root directory. He can't select it. (or maybe I do something wrong when selecting the directory)

We have tried to substr the returned string, but, it return something like the word "null". I do not remember exactly but it was something like this. With this string, we even can't determine which disk was selected. I can't test it now because I am in vacation for a month and this problem is at office and I am at home now. I have to ask to a programmer to test it and give you the response.

I can see the content of c:\ but can't select \ as the target directory.

About the suggest to select anything, then substring, I don't want it because it suggests to the user that he can select a filename. The user will search for this filename and will not find the file. It will be annoying...

Thanks again for your help and your time. It is very appreciate..

If you do want I test something else, let me know, I will contact the programmer.

(Sorry for my english, it is not very good... if something is not clear, let me know...)


  • Attachment: getdir.doc
    (Size: 30.00KB, Downloaded 1004 times)
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #256601 is a reply to message #256251] Mon, 06 August 2007 01:53 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Your English is fine.

If you want to save the file to a specific name then have you considered placing that file name in the 'Nom de fichier' slot and letting the user simply press 'OK'. Alternatively, what information is presented to you if you press the 'up directory' button ('[^]')?

David
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #257084 is a reply to message #256601] Tue, 07 August 2007 10:06 Go to previous messageGo to next message
REDALERT
Messages: 7
Registered: July 2007
Junior Member
Hi David,

If the root ‘c:\’ is selected and If I write toto.txt in the 'Nom de fichier' and I click on the ‘OK’ button, nothing happens. If I click on the 'up directory' button, nothing happens.

Jocelyne
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #257288 is a reply to message #257084] Wed, 08 August 2007 00:46 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please post your code as I don't understand why nothing is being returned to you.

David
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #257441 is a reply to message #257288] Wed, 08 August 2007 06:46 Go to previous messageGo to next message
REDALERT
Messages: 7
Registered: July 2007
Junior Member
Hi David,
This is my code.

BEGIN

:Parametre.Rep_Cible := webutil_file.DIRECTORY_SELECTION_DIALOG('C:','Répertoire cible');

If :Parametre.Rep_Cible is not null
Then
:Parametre.Rep_Cible := :Parametre.Rep_Cible||'\';
End If;
EXCEPTION
WHEN NO_DATA_FOUND THEN
-- Aucun fichier sélectionné. Fin de la procédure.
Affich_alert_pc('GEN-00111');
WHEN OTHERS THEN
null;
end;

Jocelyne
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #257646 is a reply to message #257441] Wed, 08 August 2007 20:01 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you tried using 'webutil_file.directory_root_list' or 'webutil_file.directory_list'?

What results do these two give you?

David
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #260623 is a reply to message #254045] Mon, 20 August 2007 08:44 Go to previous messageGo to next message
REDALERT
Messages: 7
Registered: July 2007
Junior Member
yes, we have tried it.

It works as it is supposed to be.

On your side, are you able, within an Oracle Forms, to call webutil and save a file in directory c:\ ?

If yes, can you send the code you use ?
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #260789 is a reply to message #260623] Mon, 20 August 2007 23:04 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I don't have an environment on my PC to work with the later versions of Forms. Everything I tell you is from work I did on previous contracts and from my notes.

David
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #264754 is a reply to message #260789] Tue, 04 September 2007 08:10 Go to previous messageGo to next message
REDALERT
Messages: 7
Registered: July 2007
Junior Member
Hi David,

Finally, we haven't found a way to select the root directory directly with the mouse. On the other hand, the user is able to write C:\ directly in the field. Be sure to use a "text field" in Oracle Form (read/write field). This way, user can save the file in the root. It is not as good as we expected at the beginning, but at least, it do the job...

Thank you for your time. It was very appreciated....

Redalert from Québec city, Province of Québec, Canada...

Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #436054 is a reply to message #264754] Mon, 21 December 2009 04:05 Go to previous messageGo to next message
Gogetter
Messages: 34
Registered: December 2009
Location: Cologne Germany
Member
It's an old thread but I found it by searching for similar question...

When you select a root directory it's selected as "\C:\"

So a workaround could be:

IF SUBSTR(v_DIR1,1,1) = '\'
THEN
  v_DIR1 := SUBSTR(v_DIR1,2);
END IF;


Rudi
Re: Webutil - DIRECTORY_SELECTION_DIALOG - unable to select the root directory [message #437547 is a reply to message #436054] Tue, 05 January 2010 00:01 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Thanks for the update.

David
Previous Topic: When calling a form from another form,got an error FRM-40108: No such form:formname
Next Topic: "FRM 10054, cannot attach pl/sql library, path.."
Goto Forum:
  


Current Time: Fri Dec 02 18:18:38 CST 2016

Total time taken to generate the page: 0.22648 seconds