Gary
I've added some comments inline.
On Apr 13, 2006, at 12:54 AM, M Pulis wrote:
Thanks, added the constructor call, no change, so I am still
missing something here.
This is my button code (some lifted from the LR and dropped into
the button, commented out from experiments):
Thanks again!
Gary
Sub Action
Dim form as Dictionary
Dim TCPSocket1 as HTTPSecureSocket // is this my "subclass" ???
Nope, no subclass here, you are just defining the local variable.
HTTPSecureSocket is a built in RB class, so if you've tried to create
a subclass (by adding a new class in the project window, then
changing its super to TCPSocket for instance) using that name, then
you are likely to have other problems.
Once you've defined the local variable, you have to instantiate the
HTTPSecureSocket before you try to use it.
This can be done either by doing:
Dim TCPSocket1 as new HTTPSecureSocket()
or by doing
Dim TCPSocket1 as HTTPSecureSocket
then calling
TCPSocket1 = new HTTPSecureSocket()
before attempting to use the socket
Dim req As String
Dim usr As String
Dim upw As String
Dim typ As String
You should never call a constructor like this.
TCPSocket1.constructor
This would be a good place to call:
TCPSocket1 = new HTTPSecureSocket()
instead
// TCPSocket1.Secure=True
usr = "test"
upw = "pass"
typ = "application/x-www-form-urlencoded"
req = "Function=Auth&Source=EDI&Username=" + usr + "&Password=" +
upw + "&UploaderName=[MyApp]&UploaderVersion=5.0.1"
// create and populate the form object
// form = New Dictionary
// form.value("firstname") = "Bob"
// form.value("lastname") = "Brown"
// setup the socket to POST the form
// socket1.setFormData form
// TCPSocket1.SetPostContent (req, typ)
I suppose that socket1 should have been TCPSocket1 in the above code?
At any rate, you can either setFormData or SetPostContent, but I
think that SetPostContent will just overwrite anything added via
setFormData.
// TCPSocket1.post "https://www.somewebsite.com/form.php"
This is a HTTPS address so be sure that TCSocket1.secure is true ,
and that defaultPort is set to 443 (the https port). By default, a
HTTPSecureSocket is set with secure=true and defaultPort=443, so you
probably don't need to set these properties but if you are possibly
going to call http or https it wouldn't be a bad idea to set them
anyway.
-jason
End Sub
On Apr 12, 2006, at 7:08 AM, Jason Essington wrote:
yup, it does work in 5.5.3
be sure that your subclass calls super.constructor in its
constructor.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>