Thanks for your reply Kevin ! But please note all my questions was not directed only to you. Please see only first question was exclusively to you. Of course all comments, opinion and clarifications about my doubts is always very welcomed from you and for any one.
kcarmody wrote:Pablo César wrote:I have one doubt. At first parameter we need to inform a acFilter as array. You make some changing for nIndex that it will index into the filter array. But tell me if I put in my order this array, should it be quite the same propose ?
I don't understand what you're saying.
In GetFile and PutFile, the nIndex argument simply tells Windows which of the filters you provided is displayed by default. The user can then change the filter to one of the other filters you provided. The order used for nIndex is the order in which you specified the filters. If your filter array is {{'Text files', '*.txt'}, {'RTF files', '*.rtf}} and you set nIndex to 2, then the RTF filter will be displayed by default.
Some time, good examples is equyivalent for thousand words.
So please note, if we have for first parameter in GetFile following array:
{{'Text files', '*.txt'}, {'RTF files', '*.rtf}} and let say programmer wants to let first as default the second element of the array and also let say the
nIndex parameter was not implemented yet. You can make your array with your predefined array already ordered (for second element be first), like this:
{{'RTF files', '*.rtf},{'Text files', '*.txt'}}.
I'm explaining why you did not understand me and my intention is not wishing to belittle, just question whether both procedures would have the same result, the same purpose. Is not it ?
kcarmody wrote:Pablo César wrote:I have another question about 3rd parameter of GetFile, which is a simple variable.
This is the default folder. I did not make any changes to this parameter.
This my question is not complete, but was made not only for you specifically. I know you do not modifyied this 3rd parameter. But I wish to ilustrate that it could be different if we change this.
kcarmody wrote:Pablo César wrote:But if we have an array (with different kind of files) should it be this 3rd parameter an array too ? Because I wish to have different default positioning for each kind of files. It would not seem as normal and appropriate that idea ? I.e. accepting as array too ?
This parameter is the
default folder, the folder which is displayed when the dialog first comes up. There can be only one such folder.
What I mean, changing codes to accept the 3rd parameter as array, it will be posible to have more than one default folder. Because it will be displayed and positioned at each case of 1st parameter. In other words:
If I have this
{{'Text files', '*.txt'}, {'RTF files', '*.rtf}} as 1st parameter and be posible to have the 3rd parameter as an array like this: {"C:\My documents\Text files\","C:\My documents\Rich files\"} then for each element I could have different folder to be displayed/positioned.
kcarmody wrote:The user can change this folder, unless you set the 5th parameter, lNoChangeDir.
I thought when 5th parameter i being setted as .F. it was only for positioning folder at returns. (
Here to see Claudio's indication)
kcarmody wrote:Pablo César wrote:Actually the 3rd parameter for GetFile (cDefaultPath) is needed to add this +"\" (backslash at final of path). IMHO, should NOT be like this (for example):
cDefaultPath := "C:\Program Files\Notepad++"+"\"
In the normal use should it be like this:
cDefaultPath := "C:\Program Files\Notepad++"
I believe Windows will accept a path with or without a trailing backslash.
Not in this case (in GetFile), Kevin. I have tested without backslash and not is showing specific extension files.
So Kevin, your comments are very welcomed but I also expect some other changings in GetFile:
1. The 6th parameter, it is ok for me. Until now, probably I did not understood the real goal of it (sorry if I mssunderstood), but do not need to change.
2. The 3rd parameter, could accept array or simple variable. In array one, allows to pre-define different paths for default folder to be displayed.
3. The 3rd parameter, accepts both ways: with and withour backslash at end of path.
But all of this is my point of view. Probably I am wrong.
And I accept Claudio opinion and others ones comments. I just used this topic because it is same subject only (except only for 1st question to the author of topic).