A bit stumped here and could not find an answer in the forums. I hope it is something obvious!
I followed the example of the "Accessing third party Jar with #Additionaljar and JavaObject - Picasso" tutorial for B4A and adjusted it for B4J (see code below) and it works great except for one thing. When the jar completes its tasks my entire B4J application closes! No errors are thrown and I cannot figure out why even using the debugger. As far as I can tell the application closes without going through the B4XPage_CloseRequest on the main page.
Anyway, here is my B4X code. I am sure it could be written better but I am still learning/experimenting. Any suggestions as to why when this completes my application closes without error?
Thanks!
I followed the example of the "Accessing third party Jar with #Additionaljar and JavaObject - Picasso" tutorial for B4A and adjusted it for B4J (see code below) and it works great except for one thing. When the jar completes its tasks my entire B4J application closes! No errors are thrown and I cannot figure out why even using the debugger. As far as I can tell the application closes without going through the B4XPage_CloseRequest on the main page.
Anyway, here is my B4X code. I am sure it could be written better but I am still learning/experimenting. Any suggestions as to why when this completes my application closes without error?
Call to my custom java code that displays Jasper Soft Report Viewer:
Private Sub Button_Open_Report_Click
Try
Dim reportName As String = reportFileNamesList.Get(selectedReportIndex)
Dim subReportDir As String = File.DirData("nmcollector/Reports") & MainPage.pathSeparator
Dim sqlConnectionString As String = File.Combine(File.DirData("nmcollector"),"nmcswDB.sqlite")
'setup link to Report Wrapper
Dim jo As JavaObject
jo.InitializeNewInstance("net.nmcollector.reportwrapper.ReportWrapper", Null)
jo.RunMethodJO("main", Array(Array As String(sqlConnectionString, subReportDir, reportName, selectedCollectionId, selectedItemId)))
Catch
Log("Open Report, error = [" & LastException & "]")
Dim sf As Object = xui.Msgbox2Async(LastException, "Error", "okay", "", "", Null)
Wait For (sf) Msgbox_Result (Result As Int)
End Try
Log("why does program close when I close report viewer?")
End Sub
Thanks!