I know from an Activity you can reference a class that has functions that may be utilized by other Activities as well (re-usable) We have to reference the class and then initialize to be able to gain access to the variables and subs within it.
Can I have?
Activity called "Editor" to work with a record from the database via a Layout.
A class called "clsEditor" related specifically to the Editor which allows for Add/Edit/Update/Delete for a specific table/database. (related to the Editor)
A separate "Database" class that has generic operations
The user would call up the Editor which would use the "Database" class for generic operations (that may be accessible by all Activities that utilize general database operations. In the case where the user does CRUD operations then the clsEditor class would be used.
In some cases I'd like to make calls from clsEditor to Database or vice-versa. Is this possible in B4A or would I just have to call the classes only from the Activity itself. Could I pass variables between them (i.e. oModule which would get the reference of "Me" when the class is initialized.
I know I can do this in VisualStudio, but can I do it in Basic4Android. My reason is to segment off the code to each module based upon its purpose. This will reduce the amount of coding required between Activities as CRUD and other DB operations are somewhat similar except for the table structure.
Can I have?
Activity called "Editor" to work with a record from the database via a Layout.
A class called "clsEditor" related specifically to the Editor which allows for Add/Edit/Update/Delete for a specific table/database. (related to the Editor)
A separate "Database" class that has generic operations
The user would call up the Editor which would use the "Database" class for generic operations (that may be accessible by all Activities that utilize general database operations. In the case where the user does CRUD operations then the clsEditor class would be used.
In some cases I'd like to make calls from clsEditor to Database or vice-versa. Is this possible in B4A or would I just have to call the classes only from the Activity itself. Could I pass variables between them (i.e. oModule which would get the reference of "Me" when the class is initialized.
I know I can do this in VisualStudio, but can I do it in Basic4Android. My reason is to segment off the code to each module based upon its purpose. This will reduce the amount of coding required between Activities as CRUD and other DB operations are somewhat similar except for the table structure.