Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem using SelectDirectory function...

176 views
Skip to first unread message

Paul Nicholls

unread,
May 8, 2002, 2:15:26 AM5/8/02
to
Hi all, I have a problem everytime I try and use the SelectDirectory and it is
pissing me off no end!

When I try and use it I always get this error:

'There is no overloaded version of 'SelectDirectory' that can be called with
these arguments' !!!


Example code below:

uses
{...}
FileCtrl;
{...}

procedure TLibraryMakerForm.TeThemeButton1Click(Sender: TObject);
const
SELDIRHELP = 1000;
var
Dir: string;
begin
Dir := cDir_Published;
if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],SELDIRHELP)
then
cDir_Published := Dir;
end;


Can anyone explain why??

Thanks in advance,
Paul Nicholls (Delphi 5 Professional)
"Life is like a road - occasionally you run into potholes or get blowouts." -
Paul Nicholls

HomePage: www.southcom.com.au/~phantom
Email: paul_f_...@antispam.hotmail.com
(Remove "antispam." to reply)


Arjang

unread,
May 8, 2002, 4:12:56 AM5/8/02
to

Just tried your code on D6.2 Ent Worked without any problem, and correctly too.

What version are you using?

Peter Below (TeamB)

unread,
May 8, 2002, 12:11:02 PM5/8/02
to
In article <3cd8c28b_2@dnews>, Paul Nicholls wrote:
> Hi all, I have a problem everytime I try and use the SelectDirectory and it is
> pissing me off no end!
>
> When I try and use it I always get this error:
>
> 'There is no overloaded version of 'SelectDirectory' that can be called with
> these arguments' !!!
> procedure TLibraryMakerForm.TeThemeButton1Click(Sender: TObject);
> const
> SELDIRHELP = 1000;
> var
> Dir: string;
> begin
> Dir := cDir_Published;
> if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],SELDIRHELP)
> then
> cDir_Published := Dir;
> end;
>
> Can anyone explain why??

You may have another routine called SelectDirectory closer in scope than
fileCtrl.SelectDirectory. If you hover the mouse over SelectDirectory, what does
the tooltip say? If you Ctrl-Click on it, where does it take you?

--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be


Howard Moon

unread,
May 8, 2002, 12:38:14 PM5/8/02
to
Try using FileCtrl.SelectDirectory
-Howard

Paul Nicholls

unread,
May 8, 2002, 7:01:19 PM5/8/02
to
When I hover the mouse over the function it says it is using
'fileCtrl.SelectDirectory'!

I am currently doing this in Delphi 6, but I have the same problem in Delphi 5
:(

--


Paul Nicholls (Delphi 5 Professional)
"Life is like a road - occasionally you run into potholes or get blowouts." -
Paul Nicholls

HomePage: www.southcom.com.au/~phantom
Email: paul_f_...@antispam.hotmail.com
(Remove "antispam." to reply)

"Peter Below (TeamB)" <10011...@compuXXserve.com> wrote in message
news:VA.00008a1...@antispam.compuserve.com...

Paul Nicholls

unread,
May 8, 2002, 7:11:06 PM5/8/02
to
It seems to complain if I have more that X units being used in a project; a
small project with minimal units, I can call the function just fine.
But as soon as I have lots of unit, I get the 'no overload version yada yada'
error and it doesn't matter if I have the FileCtrls. infront of the function
call, or have the FileCtrls.pas as the last unit in the uses clause...?!?!?!

At the moment I am using Delphi 6 Enterprise build 6.163 for a project.
--


Paul Nicholls (Delphi 5 Professional)
"Life is like a road - occasionally you run into potholes or get blowouts." -
Paul Nicholls

HomePage: www.southcom.com.au/~phantom
Email: paul_f_...@antispam.hotmail.com
(Remove "antispam." to reply)

"Arjang" <Met...@TObject.nil> wrote in message news:3cd8de08$1_1@dnews...

Peter Below (TeamB)

unread,
May 9, 2002, 7:15:17 AM5/9/02
to
In article <3cd9ae4f$1_2@dnews>, Paul Nicholls wrote:
> When I hover the mouse over the function it says it is using
> 'fileCtrl.SelectDirectory'!

Perverse <g>. Check if you have a second declaration of the sdAllowCreate,
sdPerformCreate, sdPrompt identifiers in scope.

Paul Nicholls

unread,
May 9, 2002, 6:36:08 PM5/9/02
to
Thanks, I will check it out :-)

Yeah, it is perverse isn't it! <g>

--
Paul Nicholls (Delphi 5 Professional)
"Life is like a road - occasionally you run into potholes or get blowouts." -
Paul Nicholls

HomePage: www.southcom.com.au/~phantom
Email: paul_f_...@antispam.hotmail.com
(Remove "antispam." to reply)
"Peter Below (TeamB)" <10011...@compuXXserve.com> wrote in message

news:VA.00008a3...@antispam.compuserve.com...

0 new messages