Yes Martin, been studying that all afternoon. The problem being that my App makes extensive use of SQL data bases and just changing one deprecated class such as iOSSqliteDatabase leads to host of other required changes since all the other classes associated are also deprecated such as “Field” “MoveNext”, “TextValue” etc. I have over 400 properties that would have to be changed from Text to String and there is no way to do that with search and replace. I’ve tried changing all the associated classes to non deprecated classes and that took me from about 50 errors to over 12,000. If I stay with the deprecated class iOsSqliteDatabase I only get an error with this line of code in each database.
App.PrefsDB.DatabaseFile=dbFile
Type mismatch error. Expected class Xojo.IO.FolderItem, but got class FolderItem
App.PrefsDB.DatabaseFile=dbFile
of course repeated for each different database whenever it is accessed hence about 50 errors. If I could find a solution to this, I can save the App otherwise I don’t have it in me to rewrite everything as much as I would like to. Here’s a bit of background info ion the App if you’re interested;
So looks like you changed PrefsDB from iOSSQLiteDatabase to SQLiteDatabase. dbFile looks like Xojo.IO.FolderItem. I believe since you switched to SQLiteDatabase it should be now of type FolderItem.
Yes Martin, changing from iOSSQliteDatabase to SQLiteDatabase does fix that error but in turn causes all the other errors. The Field class is no longer supported in SQLDatabase as just one example being replaced by Column. This alone throws over 2000 errors in the App which in turn no longer supports TextValue being replaced by StringValue and here’s another few thousand errors. It’s whack-a-mole. What’s frustrating is that everything was just fine until I opened the file with the latest revision.Didn’t even save it, just opened it.
Well, I understand that. Basically, you have to decide. Either stick with an earlier version of Xojo or, what I recommend, maintain your app by adapting it to the “new” framework, which has the advantage that you can largely use the code in other project types (Desktop/Console/Web). Take the few hours and try to update the code with the replacements.
I know Martin. I would love to that but it took nearly a year off and on to write this App and I don’t have it in me to do it over. What’s frustrating is I was just going to do some final testing after an extensive revision before uploading it ti the App store when this happened. The same issues are also there now in the earlier version that I was using almost as if the latest update corrupted the file by just opening it.
Tim, I wish this was so. I have plenty of backups created with the earlier version that worked fine before. As I was updating the App it was done in stages since many of my controls had to be updated to work with 2021r3.1. For instance I used Select Case using an image name for many of my iOS buttons which no longer worked. As an example:
Select Case SafetyLifeJacketCheckmarkImage.Image
Case CheckBox
SafetyLifeJacketCheckmarkImage.Image=CheckBoxWithCheck
Using Xojo.Core
Dim d As Date = Date.Now
Dim t As Text = d.Month.ToText+"/" + d.Day.ToText+"/"+d.Year.ToText.Right(2)
SafetyLifeJacketInspDate.Text=t
SafetyLifeJacketInspDate.BackGroundColor=Color.RGBA(255,255,255,0)
JacketsChanged="Yes"
JacketsChangedDate=d
Case CheckBoxWithCheck
SafetyLifeJacketCheckmarkImage.Image=CheckBox
SafetyLifeJacketInspDate.Text=""
//SafetyLifeJacketInspDate.BackGroundColor=Color.RGBA(224,243,210,0)
JacketsChanged="No"
MainView.CallBack="DismissPicker"
try
if PointerCallback <> nil then
PointerCallback.invoke
End if
catch
End Try
End Select
Using the image name as a trigger no longer worked so I had to do a workaround on this and some 200 + other buttons in the App which I did in stages saving each version as I progressed. Since just opening my last version with the latest 2022 update, none of my earlier versions work anymore with 2021r3.1 or even 2021r3. I’ve deleted 2022r1 and re-installed 2021r3.1 to no avail. All my versions now have the same errors. I’d be happy to redo all those buttons and other changes again if I I could get just one version up and running again.
Hello Christoph. It took a while to put everything back to the “deprecated” classes and get from 12000+ errors back to 42. I implemented your suggestion manually without doing a search and replace and I now have a running copy again. I can’t thank you enough for your help. Occam’s Razor. The simplest solution is usually the best solution.