G GuyBooth Active Member Licensed User Longtime User Oct 30, 2013 #1 I am rewriting some code, and I have two classes clTracklist and clFlipFlopLoader. The following code is in a service: Code: Copy Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Dim bPausedByPhone As Boolean Dim FlipFlopLoader As clFlipFlopLoader Dim lstTracks As clTrackList I get this error message for the clFlipFlopLoader, and yet the cllstTracks has no such problems. Starting to tear my hair out (or what little I have left) over this one! Please anyone, any ideas? Must be something obvious....
I am rewriting some code, and I have two classes clTracklist and clFlipFlopLoader. The following code is in a service: Code: Copy Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Dim bPausedByPhone As Boolean Dim FlipFlopLoader As clFlipFlopLoader Dim lstTracks As clTrackList I get this error message for the clFlipFlopLoader, and yet the cllstTracks has no such problems. Starting to tear my hair out (or what little I have left) over this one! Please anyone, any ideas? Must be something obvious....
Erel B4X founder Staff member Licensed User Longtime User Oct 31, 2013 #2 You will need to declare this object in Sub Globals. Upvote 0
G GuyBooth Active Member Licensed User Longtime User Oct 31, 2013 #3 Erel said: You will need to declare this object in Sub Globals. Click to expand... Not sure I understand - this is a Service, I didn't think Sub Globals were an option. I also don't understand why the other class I declare (clTrackList) works fine. For now, I have created a new service and am building it up. The addition of the same classes into its Process_Globals is so far working OK. Maybe there was some file corruption. Upvote 0
Erel said: You will need to declare this object in Sub Globals. Click to expand... Not sure I understand - this is a Service, I didn't think Sub Globals were an option. I also don't understand why the other class I declare (clTrackList) works fine. For now, I have created a new service and am building it up. The addition of the same classes into its Process_Globals is so far working OK. Maybe there was some file corruption.
Erel B4X founder Staff member Licensed User Longtime User Oct 31, 2013 #4 "activity objects" cannot be used in services as they require an activity context. The class will be an activity object if it has at least one global variable which is an activity object. Upvote 0
"activity objects" cannot be used in services as they require an activity context. The class will be an activity object if it has at least one global variable which is an activity object.