Xojo v3.2 method scope change to global not fixed. How is this possible?

I found out that in version 3 a method in a module changed scope. That means, when you set the scope of the method to protected or private, you can still call the method outside the module with “MyMethod”.

This is a show stopping bug because it makes a mess of every well developed application.

How is it possible that in version 3.2 this bug is still present?

What I

This is the first time I’ve heard of this bug and I was unable to reproduce it in a new project. Please file a bug report with whatever details you have.

I can’t reproduce this either. Are you sure that method doesn’t appear elsewhere as global?

Isn’t that “37629 - incremental compile cache is not recognizing method scope change” in Feedback?

Thank you Kern and Joe for your fast replies.

Before making this thread, I looked up my first posting but I can no longer find it.

It is reproducable because in that thread I gave the steps to Paul Lefevre. First I am using Xojo for Windows.

These are the steps to reproduce it. Let start from a new empty “Desktop” project (I assume you are now seeing the empty Window1).

  1. Create a new module

  2. Inside that module create a new method with the name “MyMethod” ( you can give it any name you like). Put the following code in this method :

MsgBox “I fire”

  1. Take a look at the scope of this method. When it shows protected or private, do not change it on this moment.

  2. When I look to the scope of the newly created method “MyMethod” it is private now (because the last set scope was private)

  3. Inside the “App” class I add an “Open” event handler.

  4. In the open event handler of the App class place the following code :

  5. I choose “run”. Remember the scope of my method is “private”.

  6. Now Xojo generate an error “object not found” which is normal.

  7. Stop the program.

  8. Now change the scope to “Global”

  9. Choose “Run” again.

  10. Xojo works as expected…

  11. Stop the execution of the program

  12. Now change the scope of the method again to private or protected (leave the code in the app class “MyMethod” vwithout referencing the module)

  13. Choose run again.

Bingo, the application will run without any problem despite the fact it should throw an error again.

I think this bug is a very serious bug. Because of it, I reverted back to version 2.1.

I really do hope this get fixed soon.

Thank you both for your time and efforts spend on my problem. It is very much appreciated.

Yes I believe it is related to #37629- which is now tagged as Fixed- so you should be able to verify it in the next update.

Thank you very much Travis. I am very glad that this will be fixed in the next update.

In the meantime I experimented a little, I added a property to the module too, made it global, protected, private and in all cases it showed normal behaviour. Then I changed the method (MyMethod) again to global, private, global, protected and guess what… it behaved normal again like it should be.

But when I close Xojo, open it again, choose a new desktop project and then follow the steps above again, it behaves again unexpected.

Thank you Xojo for fixing this bug. Nice job done!

I apologise for the double posting, here it seems that everything I post is showed twice in this thread.