I am testing CreateGlobalObject() opening a table as follows:
I have created a CDE titled "AppStartArrays" which has one table, and I am using it as stand-alone (not attached to a form). This table holds items for all ComboBoxes. I would like to make a call to open the table, then will build an array from the table to populate the ComboBox, etc. I stored "AppStartArrays" in the "AppMain" library, and I have "lAutoOpen" set to .T.
Placing the following code in a ComboBox Init():
m.oCDE=CreateGlobalObject('appstartarrays')
BROWSE
Shows that the table is opened, but in a different Data Session (by looking at the Data Session Window).
Whereas:
m.oCDE=CREATEOBJECT('appstartarrays')
BROWSE
Actually adds the table to the current datasession, and that table is selected.
Using CREATEOBJECT() actually does what I need it to do, but CodeMine 7 OnLIne help suggested using CreateGlobalObject() for global, so that is the purpose of me testing all this here.
I assume this is the normal behavior of CreateGlobalObject() and if so is there an easy way to have it open the table found in the "AppStartArrays?" within the current Data Session?
Mel Cummings