Web URL
Posted: Fri Aug 07, 2009 2:23 pm
by ConvertFromOldNGs
by
David Mitchell >> Fri, 10 Mar 2000 4:07:31 GMT
Is there any way to pass parameters to a Jade application through the web url? Firstly to just read this command line, and secondly to make Jade ignore the parameters which are for my app only.
--
David Mitchell
JADE Kid - 1998
www.jadekids.com
Re: Web URL
Posted: Fri Aug 07, 2009 2:23 pm
by ConvertFromOldNGs
by
JADE Kid - Ray Hidayat >> Sun, 12 Mar 2000 9:48:57 GMT
Is there any way to pass parameters to a Jade application through the web url? Firstly to just read this command line, and secondly to make Jade ignore the parameters which are for my app only.
I don't know, but that brings me to another question.
How do you read parameters when you start the program?
Ray Hidayat
JADE Kid - 2000
www.jadekids.com
Re: I meant command line parameters *NT*
Posted: Fri Aug 07, 2009 2:23 pm
by ConvertFromOldNGs
by
JADE Kid - Ray Hidayat >> Mon, 13 Mar 2000 21:20:58 GMT
Is there any way to pass parameters to a Jade application through the web url? Firstly to just read this command line, and secondly to make Jade ignore the parameters which are for my app only.
I don't know, but that brings me to another question.
How do you read parameters when you start the program?
Ray Hidayat
JADE Kid - 2000
www.jadekids.com
Re: Web URL
Posted: Fri Aug 07, 2009 2:23 pm
by ConvertFromOldNGs
by Craig Shearer >> Sun, 12 Mar 2000 19:35:47 GMT
Yes, there is but it's unsupported.
You'd need to reimplement the processRequest method on your schema's WebSession subclass. The method is subschemaHidden and can't be reimplemented directly in JADE so you'd need to load a .mth file to achieve this.
Here's the signature:
processRequest(httpIn : String; queryStr : String) : Integer subschemaHidden;
The queryStr will contain the URL complete with your parameters which you'll have to strip off before passing it back to JADE. So, you method would look something like:
processRequest(httpIN: String; queryStr: String): Integer;
vars
processedQueryStr: String;
begin
// retrieve URL parameters
processedQueryStr := getParameters(queryStr);
// pass it on to JADE
return inheritMethod(httpIN, processedQueryStr);
end;
You can even add properties to your WebSession subclass to store values taken from the parameters on the URL. That way, your application can access the parameters by referring to currentSession.yourparameter
Hope this helps....
<Insert usual warnings about using unsupported code here>
Craig. (and you didn't hear it from me)