First application - OSX is ok, Windows throwing Exception

My application runs fine on Mac, but when I compile the windows version and run it on Windows, it crashes after about 10 seconds with an OLEException. The exact error message is:

An exception of class OLEException was not handled. The application must shut down.
Exception Message: Exception code 0: could not complete the operation due to error 80020101., (failed on “exeScript”)
Exception Error Number: -2177352567

I’ve made my program available for anyone willing to take a quick look - its pretty basic - as in took me about 20 minutes to get right. I am guessing its something to do with the HTMLViewer App and my timer? But, I am guessing - as I am lost.

I’d appreciate the help, first application and a little not sure where to start.

for me on mac is no working
#If TargetMacOS or TargetLinux Then
Me.AutoQuit = False

mAppItem = New AppItem <------- [b]PlatformNotSupportedException.[/b]
Call Me.AddTrayItem(mAppItem)

If resume then i get msgdialog with

An exception of class PlatformNotSupportedException was not handled.
The application must shut down.

Mike… OLE is a Windows construct… it is not valid for OSX… so what ever function you require, will need to be differently for MAC.
Cross-Platform does not mean XOJO can make software (ie. OLE objects) work under OSX, and vice-versa… it means that the code YOU write in XOJO can compile for both.

Did you run it from Xojo on Windows so you can use the debugger? When I ran it on Windows from Xojo the OLEException is raised on this line:


in Window1.titleTimer.Action event handler.

Changing the HTMLViewer to use WebKit instead of native seems to work. That implies that maybe your JavaScript is not compatible with the native IE renderer.

Thanks everyone for the help, it never occurred to my to try running it on windows in Xojo. I’ll do this going forward (was a great tip). I just switched to WebKit and it is working now. Is there a way I could have caught the exception?

With try
take a look here

I could not download the project which has now been apparently deleted, but this kind of error often happens when one tries to run JavaScript before the DOM is fully loaded.