Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CreateGlobalObject()
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
CodeMine
Title:
CreateGlobalObject()
Miscellaneous
Thread ID:
00670322
Message ID:
00670322
Views:
78
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  && test just to see in the table in AppStartArrays is selected
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  && test just to see in the table in AppStartArrays is selected
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
Next
Reply
Map
View

Click here to load this message in the networking platform