Simple References "its back"

I see the Simple References button is back in the latest version. Is that so we can turn off?

Button off is the preferred way we should be doing things?

I have looked some but can not find much discussion on what this button does.

Thanks.

Simple References continues to appear in iOS projects created before 2020r2. It does not appear in projects created in 2020r2 or later.

More info here:
UserGuide:iOS API 2.0 Changes - Xojo Documentation

Thank you Sir.
Yes showing up in earlier app I guess it was always there.
by turning off I had to change several lines of code like getresource call outs etc.

How come in I guess the newer app (no simple References button and can’t remember which versions it was started in) the change to getresource does not work

this works
var myFolder As FolderItem = Xojo.IO.SpecialFolder.GetResource(“Rainfall_Distributions”).Child(fn)
this doesn’t (This item does not exist) but works in the older app with simple references turned off.
var myFolder As FolderItem = SpecialFolder.Resource(“Rainfall_Distributions”).Child(fn)

What doesn’t work? Your code compiles fine for me in 2021r2.1:

Var fn As String
Var myFolder As FolderItem = SpecialFolder.Resource("Rainfall_Distributions").Child(fn)

Thanks.
Using 2021r2.1 on a file that does have simple reference switch available.

Screen Shot 2021-10-22 at 10.47.45 AM

If I use the “getresource” all works well.

the app file Does NOT have simple resource switch available.sorry

Perhaps you can share your project.

You definitely have a discrepancy of some kind. You can see from the errors that it thinks it should be using Text and Xojo.IO.FolderItem, so it would seem to be using Xojo.IO.SpecialFolder, which does not have a Resource method.

Edit: You might also want to see if you have any Using statements that could be confusing things.

Thanks.

I thought is was a simple reference issue because I had same code for another app and when I turned Simple Reference off I had to make many of the same changes that I did in this app however I noticed that this app did not have the Simple Reference button available so it was a bit of a quandary with what’s going on.

Did a search for “Using” only shows using in text statements.

It’s a big project to share.

You don’t have to share your entire project. Perhaps you can just extract out the small portion that demonstrates this compile error.

Or you could create a private Feedback case and attach your entire project to that.

I submitted a feedback/ bug report of the project.

66355 - Project acting (especially file handling)as if Simple Reference is on an there is no way to turn off.

Not sure how accurate my description. Thanks for the help.

I responded tonight on the case with some thoughts and a workaround for now.

Thanks I will give it a try. Appreciate the quick response!

Worked like a charm thank you very much.

Just a heads up I am 100% sure that I hit Save As by mistake a few times however I am 99.9% sure I never followed through with the Save As I canceled and went back to save. Not sure that should have updated my version since I really did not Save As?

Thanks Again!!

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.