Page 1 of 1
mistake with the property choice
Posted: Thu 11 Aug 2016 14:25
by bauerh
If I select in the component ScSFTPClient1 the property OnDirektoryList
I get the mistake "Falsche Methodendeklaration in Klase TMain1"
same with
On Data, OnError, OnOpenFile ….
(Embacadero C++Builder XE)
what I can do ?
regards
Horst
Re: mistake with the property choice
Posted: Thu 11 Aug 2016 15:11
by ViktorV
The similar question has already been discussed on our forum. Follow the link
viewtopic.php?t=33906
Re: mistake with the property choice
Posted: Fri 12 Aug 2016 09:26
by bauerh
with store the announcement comes
Die Methode SCSFTPClient1DirektoryList enthält eine inkompatible Parameterliste
Main.h
void __fastcall ScSFTPClient1DirectoryList(TObject *Sender, const AnsiString Path,
const const TBytes Handle, TScSFTPFileInfo *FileInfo, bool EOF);
Main.cpp
void __fastcall TMain1::ScSFTPClient1DirectoryList(TObject *Sender, const AnsiString Path,
const TBytes Handle, TScSFTPFileInfo *FileInfo, bool EOF)
{
}
Main.dfm
object ScSFTPClient1: TScSFTPClient
SSHClient = ScSSHClient1
OnDirectoryList = ScSFTPClient1DirectoryList
Left = 312
Top = 72
end
do {
ScSFTPClient->ReadDirectory(Handle);
} while (!ScSFTPClient->EOF);
if it gives away one more e.g.
do {
ScSFTPClient->ReadDirectory(Handle);
ListBox->Items->Add(???? Directory or File ???)
} while (!ScSFTPClient->EOF);
Re: mistake with the property choice
Posted: Fri 12 Aug 2016 12:18
by bauerh
Hello,
who has solved the problem with the C ++ BuilderXE?
Re: mistake with the property choice
Posted: Fri 12 Aug 2016 12:45
by ViktorV
1. To solve the issue, please assign the event handler in code at run-time. For example:
Code: Select all
void __fastcall TMain1::FormCreate(TObject *Sender)
{
ScSFTPClient1->OnDirectoryList = ScSFTPClient1DirectoryList;
}
2. To solve your task, you should execute the ListBox->Items->Add method not after calling
the TScSFTPClient->ReadDirectory method, but in the TScSFTPClient::OnDirectoryList event handler.
Re: mistake with the property choice
Posted: Fri 12 Aug 2016 12:59
by bauerh
hello, viktor
many thanks for your help
Re: mistake with the property choice
Posted: Fri 12 Aug 2016 13:04
by ViktorV
Thank you for being interested in our products.
If you have any questions concerning our products, please don't hesitate to contact us - and we will try to help you resolve them.