| View previous topic :: View next topic |
| Author |
Message |
Qvo Guest
|
Posted: Wed Jun 07, 2006 11:33 pm Post subject: CGI Expert's HttpMemoFilter - Assign text to HttpMemoFilter |
|
|
I've used CGI Expert (which is written in Delphi) successfully for a
couple of years.
Please note that I use the mentioned Delphi component in my C++ Builder
IDE, and I'm simply trying to assign text to an HttpMemo
programatically instead of clicking on the components Text property and
pasting the code there.
IMPORTANT: The Text property appears to be a TStringList, and when
pressed from the IDE it opens a 'String List Editor' dialog where you
paste your html into.
This is my code snippet:
// read text file into a list
TStringList *oList = new TStringList();
oList->LoadFromFile( "whatever.txt" );
// assign text to component - COMPILER ERROR!
HttpMemoFilter1->Text = oList->Text;
The error is: Cannot convert AnsiString to TStringList.
In fact, I can't even assign text as follows:
HttpMemoFilter1->Text = "what the heck is going on";
The error here is: cannot convert char * to TStringList.
Any suggestions would be greatly appreciated.
Thank you |
|
| Back to top |
|
 |
Qvo Guest
|
Posted: Thu Jun 08, 2006 12:50 am Post subject: Re: CGI Expert's HttpMemoFilter - Assign text to HttpMemoFil |
|
|
Ok, I got it:
HttpMemoFilter1->Text->Text = oList->Text;
Qvo wrote:
| Quote: | I've used CGI Expert (which is written in Delphi) successfully for a
couple of years.
Please note that I use the mentioned Delphi component in my C++ Builder
IDE, and I'm simply trying to assign text to an HttpMemo
programatically instead of clicking on the components Text property and
pasting the code there.
IMPORTANT: The Text property appears to be a TStringList, and when
pressed from the IDE it opens a 'String List Editor' dialog where you
paste your html into.
This is my code snippet:
// read text file into a list
TStringList *oList = new TStringList();
oList->LoadFromFile( "whatever.txt" );
// assign text to component - COMPILER ERROR!
HttpMemoFilter1->Text = oList->Text;
The error is: Cannot convert AnsiString to TStringList.
In fact, I can't even assign text as follows:
HttpMemoFilter1->Text = "what the heck is going on";
The error here is: cannot convert char * to TStringList.
Any suggestions would be greatly appreciated.
Thank you |
|
|
| Back to top |
|
 |
Riki Wiki Guest
|
Posted: Thu Jun 08, 2006 1:49 am Post subject: Re: CGI Expert's HttpMemoFilter - Assign text to HttpMemoFil |
|
|
Hoi
Great that you solved your own problem. For next time you post you need to
be aware that this news group do not exist. The right group is
b.p.d.internet.winsock. Also, when you post using Google Groups most people
can not see your post. Why this is so read here:
<http://tinyurl.com/8m5nw>
which links to
<http://delphi.wikicities.com/wiki/Delphi_Newsgroups> |
|
| Back to top |
|
 |
Qvo Guest
|
Posted: Thu Jun 08, 2006 5:57 am Post subject: Re: CGI Expert's HttpMemoFilter - Assign text to HttpMemoFil |
|
|
Howdy,
Thank you kindly for the info.
Riki Wiki wrote:
|
|
| Back to top |
|
 |
|