Hi there,
opening a document in a form, one has access in the Queryopen event to the NotesUiDocument, but the property NotesDocument is not yet instantiated; the document simply does not yet exist, the value is nothing.This is not very practical.
It makes sense to not give yet access to the content of the document because restrictions defined in this event etc. may apply and dod not allow to acces the doucment. But a document reference, like in LS: Set doc=db.createDocument, would allow to have the reference to anmpty document which later (i.e. Postopen) gets its content.
The Postopen event is not necessariyl the next event triggered after the Queropen in a form, dependend on how the form was build, it can be another event. Thus one always has to write code in these events that assumes that the backend document was not yet set. And that can cause preventable errors.
Yes, if the timer interupt would allows a 10th of a second and not only integer seconds then one could use such a timer to set the backenddoc when available and stop the timer if done.
Yes one also could create an "On Event Postopen from Source" to catch the moment when the doc is completly available. But then the Postopen Event can not longer be used for @Formula, it has to be LS.
To explain my problem a bit more in detail: We use a generic LS library (ยง) for all design elements. That allows us to skip these repeating and reapting standard Notes declaration and instantisations : Set WS= , Set DB = , Set Doc = etc. Everything works fine , but Doc has to be a Property Get command and this is really bad if one has to debug code.
Or do you guys have an idea how one can already have a valid reference to the backend document in the Queryopen?
Thanks in advance (TIA)
Jochen "Joe" Herrmann
BTW. The Designer help search is nearly unusable