G
Gary Schuldt
"Everything was going along fine, and then . . . !"
I am not sure what the *best* way is to handle this problem--*best* meaning
high maintainability, high reuse, straightforward coding.
============================
I have a normal sequence of forms:
Seq#1: frmA --> frmB -->> frmC.
frmA is a search form (to isolate the frmB record), and from frmB you can
get to many frmC records (master -->> detail sort of pattern). A user would
normally start with the search frmA and go from there. From frmB you can
either just look at or even add C's via frmC.
==========================
Enter the spoiler, frmX!
frmX is sort of an "Xpress receiving" form, allowing you to (temporarily)
log in a bunch of C's without knowing precisely which B they are related to
.. . . something you'll determine later when you have time.
It's this "later", when you reprocess frmX data, that I'm not sure what to
do. You see, frmX has some stuff on it that needs to be carried over into
frmC (pushed to it or pulled by frmC). (This stuff is contained partly on
frmX and partly on a subfrmC within frmX.)
During this "reprocessing", the sequence is:
Seq#2: frmX.subfrmC --> frmA --> frmB -->frmC
Right now, in frmC OnOpen, I test to see if frmX IsLoaded, and, if so, pull
the stuff from it I need.
==================================
It works . . . but I see a flaw: Just because frmX IsLoaded doesn't mean I
got to frmC via Seq#2!
Instead, this could've happened:
UserThread 1: frmX . . . (incomplete Seq#2 that never opens frmC)
UserThread 2: Seq#1, ending up in frmC, which OnOpen finds out frmX is
loaded . . . but the context is probably wrong for pulling the data from
frmX into frmC.
================================
Potential Solution: OK, I could make "duplicates" of frms A, B and C--say
frmAx, frmBx, and frmCx--which would have basically the same functionality
as frms A, B, and C, except they would only run in Seq#2--i.e., initiated
starting with frmX.
That doesn't seem too smart, since I have essentially two copies of each of
three form modules, so, if for example I modify frmB I also probably have to
make the same modification to frmBx, and so on.
Or, I suppose I could devise enough globals and/or hidden unbound fields
that would communicate to frmC whether it was in the same UserThread as
frmX, but that seems really complex design. Anyway, I don't immediately see
how to do it!
====================
Appeal for help: Anyone have an elegant design solution to this problem? I
realize the problem statement is somewhat lengthy, but . . . nothing
ventured nothing gained!
Thanks.
Gary
I am not sure what the *best* way is to handle this problem--*best* meaning
high maintainability, high reuse, straightforward coding.
============================
I have a normal sequence of forms:
Seq#1: frmA --> frmB -->> frmC.
frmA is a search form (to isolate the frmB record), and from frmB you can
get to many frmC records (master -->> detail sort of pattern). A user would
normally start with the search frmA and go from there. From frmB you can
either just look at or even add C's via frmC.
==========================
Enter the spoiler, frmX!
frmX is sort of an "Xpress receiving" form, allowing you to (temporarily)
log in a bunch of C's without knowing precisely which B they are related to
.. . . something you'll determine later when you have time.
It's this "later", when you reprocess frmX data, that I'm not sure what to
do. You see, frmX has some stuff on it that needs to be carried over into
frmC (pushed to it or pulled by frmC). (This stuff is contained partly on
frmX and partly on a subfrmC within frmX.)
During this "reprocessing", the sequence is:
Seq#2: frmX.subfrmC --> frmA --> frmB -->frmC
Right now, in frmC OnOpen, I test to see if frmX IsLoaded, and, if so, pull
the stuff from it I need.
==================================
It works . . . but I see a flaw: Just because frmX IsLoaded doesn't mean I
got to frmC via Seq#2!
Instead, this could've happened:
UserThread 1: frmX . . . (incomplete Seq#2 that never opens frmC)
UserThread 2: Seq#1, ending up in frmC, which OnOpen finds out frmX is
loaded . . . but the context is probably wrong for pulling the data from
frmX into frmC.
================================
Potential Solution: OK, I could make "duplicates" of frms A, B and C--say
frmAx, frmBx, and frmCx--which would have basically the same functionality
as frms A, B, and C, except they would only run in Seq#2--i.e., initiated
starting with frmX.
That doesn't seem too smart, since I have essentially two copies of each of
three form modules, so, if for example I modify frmB I also probably have to
make the same modification to frmBx, and so on.
Or, I suppose I could devise enough globals and/or hidden unbound fields
that would communicate to frmC whether it was in the same UserThread as
frmX, but that seems really complex design. Anyway, I don't immediately see
how to do it!
====================
Appeal for help: Anyone have an elegant design solution to this problem? I
realize the problem statement is somewhat lengthy, but . . . nothing
ventured nothing gained!
Thanks.
Gary