2007 RB Project to Xojo - HTTPSocket1 on Main implements the event DownloadComplete, but its SuperClass TCPSocket Already Has Implemented the Event

I a converting a 2007 RB Project to Xojo.

I am still stuck on three similar errors.

Only the DownloadComplete event has any code for HTTPSocket1 so I could could get rid of two errors by removing those, but it still would not answer what is causing this.

What is the superclass ?

That did the trick. Thank You!

I examined the super of HTTPSocket1 as saw it was set to TCPSocket. There were two further selections of HTTPSocket > Class1. I switched this to Class1.

I deleted the two unused events from HTTPSocket1. I copied the code from the DownloadComplete of HTTPSocket1, deleted that event and created a DownloadComplete event for Class1 where the code was pasted.

That fixed the issue of running in Xojo. Strangely, this ran fine in RB and RealStudio.

This was a companion app that batch downloaded data from a site which is repackaged for use with my main app. This rarely changes - only one major update since 2007.

Unfortunately it does not appear that my previous Xojo code will work for the site any logner. The previous code submitted a group of strings inside a loop to a url ending in “.asp”. The site url and form id have been changed. Information is now being dynamically displayed using javascript upon clicking a input button. The Xojo download will now create nothing more than a series of blank html.

Manually saving the page from Safari creates a file which contains html but which is devoid of the information generated by the javascript triggered by pressing the input button. Manually saving the the same page as a web archive does save this information.

I was thus looking for a way to create a loop that would populate the form, submit it, and save the result as a webarchive file from safari. Information would then be extracted from the webarchives files instead of the previous html files my RB app created.

For the time being I was able to create a Applescript by adding my own Applescript code with various bits created by others. Currently I have this running in Script Editor and have not attempted to run said code using Xojo.

I don’t want to give away the specific code I created as this would compromise my main app; however, I will provide links to the Applescript code created by others that you can use to create something similar.

Modifications of these methods are called inside a loop that submits individual substrings from a larger string.

Code to fill out forms:

Code to click button:

Modifications of the code below is used inside a loop to save the files (second post in thread). The top “set theFMPfieldText…” was removed and the lower “keystroke theFMPfieldText” instead uses a string provided by the loop.


I also needed some Applescript that would pad my substrings with extra zeros. My previous RB code used select case to accomplish this.

A delay of 20 was added inside my loop to be on the safe side.

I’d be surprised if they allow this any more anyway.