SpecialFolder.Getresources

Dim myFolder As FolderItem = SpecialFolder.GetResource(“Rainfall_Distributions”).Child(Filename )

saying this item does not exist. I have another app with essentially identical coding and it works beautifully. Essentially I am copying or creating a settings and data storage file in the documents folder of the app.

To top it off I am getting this error message that does not seem to be related but then I do not know.


I have redone my copy files to make sure the file name in the Child(Filename) existing amounts the all the files aI am copying in.

Thanks in advance for any help!

GetResource is part of Xojo.IO.SpecialFolder, which prior to 2020r2 could just be written as SpecialFolder.GetResource if Shared Build Settings, Simple References was ON.

Starting with 2020r2 you probably want this for old code:

Xojo.IO.SpecialFolder.GetResource("File").Child(filename)

or this if you are upgrading to iOS 2.0:

SpecialFolder.Resource("File").Child(filename)

Your TypeInfo error might also be solved simply by using the full path name:

Xojo.Introspection.TypeInfo

@Antonio_Rinaldi will need to look at this TypeInfo error

I’m updating the extension (it’s almost done) but I will recheck the old release to verify this problem.

in any case introspection is a mess with GetType on iOS…

This is interesting I have two apps I am working on may sound silly but do similar processes. They use the same .Getresources and the same IOSTableViewExtended.

Yet one app I can run without any issues and the other is now shut down. Same version of XOJO seems a bit strange to me.

Reason is one project was created prior to Xojo 2020r2 and has simple references turned on.

Second project has simple references turned off.

Thank you sir. I assume the app working has simple reference turned on? Where does one Turn these off and on spent a while looking around need not see anything specific that turns on or off.

1 Like

I’ve got the same issue - were has the switch “simple preferences” gone …
I put in a lot of work transferring from API1 to API2 but the App won’t run.
And the compiler won’t give me any help why not. Is there a way to get more detailed informations of compiler errors.

When you have your old project converted search for
“Dictionary” and change it to “Xojo.Core.Dictionary” etc. do this for all classes that you used that are now only accessible trough their full e.g. “Xojo.Core.ClassName” names.

You have to go back to the last release in 2019 load it up and the switch is there.

Kenneth - I feared that you said so … cannot go back with the XOJO 2020R2.1 version of my App I’ve been programing lots of changes now for about one week - XOJO 2020R1.2 won’t read it - I tried.
That means I have to go completely back and redo all the work again :frowning:
Would be much nicer to have the “simple preference” switch back again !

Did you try 2020R2.1 ?

And the switch is default OFF (if invisible) meaning you have to change ALL “Text” data types to String and use only API.1.0 or API2.0 but Not the “new framework” (e.g. all with Xojo.) or if you insist on using the “new framwork” stuff you need to prepend "Xojo.… " before all usage of classes or modules of that framework.

Generally speaking; don’t mix up the “xojo framework” with newer code (api1.0/api2.0).

Personally i’d REMOVE all of iOSKit if you use that. Then update that with the newer API2.0 build on gituhub.

DerkJ - yes I’m on 2020R2.1 …
I’ll try to go for a complete change to API2.0 and get rid of the IOSKit stuff.
But it costs me much more time I thought!

You as many others where unprepared because xojo had the setting “Simple references” build in. If it wasn’t there in the first place you would have easily made the change…
I had it turned off all the time, so did not had these issues with my own projects. Some projects i did work on had it to ON that caused the same problems now as you have.

IOSKit should support API2 with simple references disabled. As long as you have downloaded the most recent version.

1 Like