🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
3 messages
3 total messages Started by Bill D. Pirkle Wed, 05 Jan 2005 21:47
Indy 9.0.17, URLEncode
#1462
Author: Bill D. Pirkle
Date: Wed, 05 Jan 2005 21:47
22 lines
1472 bytes
Hi all,

This is probably a stupid question, but I'm stuck.

I'm trying to use URLEncode in Indy 9.0.17 in BCB6.  The Indy
documentation and examples show it taking only a String, but the
actual code also requires a "TMetaClass*".  I've tried this:

  myStr = TIdURI::URLEncode(0, myStr);

and

  myStr = TIdURI::URLEncode(__classid(TIdURI), myStr);

Both result in a run time popup message:  "Protocol field is empty.".
Wrapping things in a "try" block suppresses the popup, so I assume I'm
triggering some sort of exception.  I've Googled, and it seems that
the __classid thing is what I'm supposed to be doing to call OP class
routines from C++, and I yelled that at my computer, but it won't
listen.  ;-)  What am I doing wrong?

Bill D. Pirkle
Re: Indy 9.0.17, URLEncode
#1463
Author: Remy Lebeau (TeamB)
Date: Wed, 05 Jan 2005 23:54
27 lines
1823 bytes
"Bill D. Pirkle" <mbpirkle@NOSPAM.att.net> wrote in message
news:41dc435f.54129554@newsgroups.borland.com...

> I'm trying to use URLEncode in Indy 9.0.17 in BCB6.  The Indy
> documentation and examples show it taking only a String, but the
> actual code also requires a "TMetaClass*".

The examples and documentation are based on Delphi, which does not require
the extra parameter.  In C++, the extra parameter is required as part of
BCB's compatibility layer with Delphi, since C++ and Pascal have different
architectures and sementics.

> I've tried this:
<snip>
>   myStr = TIdURI::URLEncode(__classid(TIdURI), myStr);

That is the correct way to do it.

> Both result in a run time popup message:  "Protocol field is empty.".

That is a run-time parsing error, not a compile-time syntax error.  Your
input string is not formatted as a valid URL that URLEncode() can encode
properly.


Gambit
Re: Indy 9.0.17, URLEncode
#1464
Author: Bill D. Pirkle
Date: Thu, 06 Jan 2005 03:35
11 lines
1104 bytes
On Wed, 5 Jan 2005 15:54:53 -0800, "Remy Lebeau \(TeamB\)"
<no.spam@no.spam.com> wrote:

>That is a run-time parsing error, not a compile-time syntax error.  Your
>input string is not formatted as a valid URL that URLEncode() can encode
>properly.

Ahhh, okay.  Thanks, I'll investigate that direction to see what is
going wrong.

Bill D. Pirkle
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads