Where do I need to place a #object... statement within a form-based application in order for the object to be recognised throughout the project? I've tried in the initialization section and in the Control Code section for the main form, and in both cases when it hits a reference to the object it indicates that there is no definition for the function or procedure referenced by the object. I can take the same object class and define an instance of it in a simple formless app and it works just fine.
[Edit] My bad. what I meant was that I put code in the Form Creation and Control Code sections. But to be fair I went back and tried adding the #object line to the initialization code as well. That didn't help either. Here's what my current code base looks like from the top down if I do a "view source":
Even with the #object declaration before any reference to the object, it acts like records$ is not an object when I try to actually use it.
[Edit] My bad. what I meant was that I put code in the Form Creation and Control Code sections. But to be fair I went back and tried adding the #object line to the initialization code as well. That didn't help either. Here's what my current code base looks like from the top down if I do a "view source":
- Code:
#include "common.ppl"
#define FORM100 100
#define cboTables 101
#define tabTabs 104
#define lstMessages 103
#define lblDatabase 105
#define lvwStructure 106
#define edtQuery 108
#define lvwData 111
#code {Main.frm#}
#import "\\windows\\adoce31.dll"
#include "combobox_lib.ppl"
#include "treeview_lib.ppl"
#include "listview_lib.ppl"
#include "listbox_lib.ppl"
#include "tabctl_lib.ppl"
#include "sql.ppl"
#include "sqlclass.ppl"
#object SQLiteObject records$
Even with the #object declaration before any reference to the object, it acts like records$ is not an object when I try to actually use it.