aeric Expert Licensed User Longtime User Nov 7, 2025 #2 Why you write Me.something like this? Me is a reserved keyword. Upvote 0
Lee Gillie CCP Active Member Licensed User Longtime User Nov 7, 2025 #4 Why are you telling Me. this? Attachments 1762535768017.png 40 KB · Views: 304 Upvote 0
Alessandro71 Well-Known Member Licensed User Longtime User Nov 7, 2025 #5 Is it a class o code module? class modules should have a Class_Globals section, not a Process_Globals Upvote 0
Is it a class o code module? class modules should have a Class_Globals section, not a Process_Globals
Lee Gillie CCP Active Member Licensed User Longtime User Nov 7, 2025 #6 I also gave this a try... Upvote 0
klaus Expert Licensed User Longtime User Nov 7, 2025 #7 You need to give more information ! The best way to help you would be if you posted a small project showing the problem. What exactly want you to do ? Where are these routines ? In the class module ? Upvote 0
You need to give more information ! The best way to help you would be if you posted a small project showing the problem. What exactly want you to do ? Where are these routines ? In the class module ?
Alessandro71 Well-Known Member Licensed User Longtime User Nov 7, 2025 #8 From the screenshot, it looks like a Class module: so read my previous message… Upvote 0
Lee Gillie CCP Active Member Licensed User Longtime User Nov 7, 2025 #9 Alessandro71 said: Is it a class o code module? class modules should have a Class_Globals section, not a Process_Globals Click to expand... Yes I think you are 100% on this. I did research and found that both Class_Globals and Process_Globals can not both exist in a single file. The answer it seems is to move all of the Process_Globals I have declared to another file, and to ONLY use Class_Globals for my instance variables. Thank you for this hint. Upvote 0
Alessandro71 said: Is it a class o code module? class modules should have a Class_Globals section, not a Process_Globals Click to expand... Yes I think you are 100% on this. I did research and found that both Class_Globals and Process_Globals can not both exist in a single file. The answer it seems is to move all of the Process_Globals I have declared to another file, and to ONLY use Class_Globals for my instance variables. Thank you for this hint.
Alessandro71 Well-Known Member Licensed User Longtime User Nov 7, 2025 #10 So you added Process_Globals on purpose? bad Idea… classes can have multiple instances, so Globals are out of context Upvote 0
So you added Process_Globals on purpose? bad Idea… classes can have multiple instances, so Globals are out of context
Lee Gillie Member Licensed User Longtime User Nov 7, 2025 #11 Alessandro71 said: So you added Process_Globals on purpose? bad Idea… classes can have multiple instances, so Globals are out of context Click to expand... I will admit I have been using B4A a very long time, but the problem is I only have 1 project in it, and that means I only ever work with B4A once every 1 or 2 years. Across those gaps in time I forget most of the nuances I was versant in on my last round of work. I asked AI for a quick rundown of module types, scope, lifetime, singletons and it made my blunder very obvious, and fully explains the struggle I was having trying to define both a singleton global context, and also an instance context in the same source file. Seemed to me like it should be possible, and there were no compile complaints about specifically having both kinds of classes defined in one file, there was just a lot of odd appearing behavior I could not reconcile. I moved EVERYTHING that is global, and singleton to an existing global module. And separated out that which is related to instance context, and it is coming together fine now. 2 days ago, I did not have this clarity. I truly appreciate the replies from everyone who did, but there was one post especially that gave me the first hint. Thank you all. B4A has such an awesome community of users! Upvote 0
Alessandro71 said: So you added Process_Globals on purpose? bad Idea… classes can have multiple instances, so Globals are out of context Click to expand... I will admit I have been using B4A a very long time, but the problem is I only have 1 project in it, and that means I only ever work with B4A once every 1 or 2 years. Across those gaps in time I forget most of the nuances I was versant in on my last round of work. I asked AI for a quick rundown of module types, scope, lifetime, singletons and it made my blunder very obvious, and fully explains the struggle I was having trying to define both a singleton global context, and also an instance context in the same source file. Seemed to me like it should be possible, and there were no compile complaints about specifically having both kinds of classes defined in one file, there was just a lot of odd appearing behavior I could not reconcile. I moved EVERYTHING that is global, and singleton to an existing global module. And separated out that which is related to instance context, and it is coming together fine now. 2 days ago, I did not have this clarity. I truly appreciate the replies from everyone who did, but there was one post especially that gave me the first hint. Thank you all. B4A has such an awesome community of users!
Alessandro71 Well-Known Member Licensed User Longtime User Nov 7, 2025 #12 The compiler not complaining about duplicate Globals may be a case for a bug report. that may be a case that wasn’t even considered Upvote 0
The compiler not complaining about duplicate Globals may be a case for a bug report. that may be a case that wasn’t even considered