>>>had to get the grid out of my browse form class, and put a unique grid
>>>in each instance. That's fine, but why did this happen?
>>
>>Seems to me that when grid was in the class definition, it had to be
>>instantiated earlier, i.e. before any of the events on the form; when it
>>was on the form, it was treated as an object which could be data bound,
>>so it was instantiated after setting up the DE, so when it's init fired
>>in the first place, it fired before the DE, and found no tables at all.
>>
>>Just guessing. What would Sherlock say to this?
>
>When .AutoOpenTables was .T., it was working. But I don't know what
>Sherlock would say.
We seem to get down to its intestines, my dear Watson. So, if you
have .autoopentables, grid.init fires in time; if you have
..autoopentables=.f., all the object inits fire before the
..beforeOpenTables... One possible test I can think of, is if you had
a simple Suspend in your grid's .init (the one which didn't work,
and I mean GridClassDefinition.init), and see if any tables managed
to get open when the grid object gets instantiated. Or just put a
watch breakpoint on program() and see what fires in what order.
Though, many situations of this kind seem to be in the
analyisis-paralysis line... we may spend a lot of interesting hours
trying to guess what's going on, yet it may lead us nowhere.