My app is using a datastore, inside a nvo to generate syntax for creating a datawindow, on the surface of a visual object. The syntax was applied in two steps.
On the first step, the syntax was created by using syntaxFromSQL() on the datastore, applying some visual modifications, adding retrieval arguments and changing the SQL.
On the second step, the syntax that is generated on the first step is applied to the datawindow. But before this action, a number of other visual objects / tab pages are created / initialized.
In order to "solve" my problem, I had to implement both operations in one step, so after the initialization of the other visual obejcts, I create the syntax and I apply it to dw.
I am not sure why is this happening, but now my problem disappeared.
Unfortunately, I am not able to reproduce this problem in a small, simple application that I can upload on a bug ticket...
As for the reason, "Guessing in the dark", but I could only think of something weird happening with maybe "create on demand of tabpages", constructor events being triggered AFTER other events or your dw_main not yet being really initialized somehow before you tried to work on it.
regards