The foundset could belong to any one of a number of forms which refers to different tables ```
forms[mainFrm]
The problem is that I don't know how to define the foundset in JSDoc to avoid getting a warning because there is no single db/table pair to refer to. I also tried to create the global variable on the fly using the solution model, but it doesn't help.
Any wise suggestion? Thank you.
/**
* @type {JSForm}
*/
var __ActiveForm;
/**
* @type {JSFoundset}
*/
var __ActiveFoundset ;
function test() {
globals.__Foundset = forms[globals.__ActiveForm].foundset;
}
However, this doesn’t produce any warnings. So you must be doing something else that causes the warning? Of course this general JSFoundset type does not have any specific elements like in a normal foundset reference but that’s to be expected.
You might want to reconsider directly accessing objects from outside the object container they are located in because you will get references that might break on future changes. I would prefer to define a method in the form itself and reference that instead because then your code does know the specifics about the foundset.
Please elaborate on the details of your problem if it persists.
Thank you Omar. Probably my explanation of the problem was not very clear. As the global variable could contain any foundset from any source I was wondering how could I write the JSDocs notation not knowing in advance the db/table pair. I didn’t know that I can instead use a generic ``` @type {JSFoundset}