Avoiding StackOverflow exception when passing values bidirectionally between forms

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<p style="margin-bottom:18px; padding-right:0px; outline:0px; font-size:13px; vertical-align:baseline; background-color:#f0f3f4; color:#222222; font-family:Segoe UI,Tahoma,Arial,Helvetica,sans-serif; line-height:18.200000762939453px
I mustve read over 20 threads so far that Ive googled about accessing form elements from another form in the quest to answer this issue, and the most common reply that I came across is JFGIY (Just Effing Google It Yourself). So in my defense I would
like to say that Ive tried googling this a half a dozen ways and I cant really think of any other way to put it that might turn up better hits. I digress; here is my problem.
<p style="margin-bottom:18px; padding-right:0px; outline:0px; font-size:13px; vertical-align:baseline; background-color:#f0f3f4; color:#222222; font-family:Segoe UI,Tahoma,Arial,Helvetica,sans-serif; line-height:18.200000762939453px
Ive got an application that Im building whose parent form has a List of custom classes that I need to try to access from the child form. At the same time, I need to be able to access CheckListBox elements from the parent form, and I need to be able
to pass back from child to parent some modified versions of all of the above. Its basically a form that opens for editing some of the details on the primary form, where it is not aesthetically correct to have the editing options available.
<p style="margin-bottom:18px; padding-right:0px; outline:0px; font-size:13px; vertical-align:baseline; background-color:#f0f3f4; color:#222222; font-family:Segoe UI,Tahoma,Arial,Helvetica,sans-serif; line-height:18.200000762939453px
Most of the detailed discussions Ive come across mention that you have to designate a variable (I hope thats the right word in this case) as the name/type form that you have created for each one and then you can access its members via the dot operator as
per standard OOP. Unfortunately I find that when I have each form with a section in their respective code declaring a variable to be equal to a new form of the other forms type that this causes a StackOverflowException or something of the like.
<p style="margin-bottom:18px; padding-right:0px; outline:0px; font-size:13px; vertical-align:baseline; background-color:#f0f3f4; color:#222222; font-family:Segoe UI,Tahoma,Arial,Helvetica,sans-serif; line-height:18.200000762939453px
For now Ive made the editing options on my application unavailable; obviously this is not the solution that I am looking for. Can anybody help my poor quality of google-fu and point me in the direction of a resource that will handle this case, and/or
help me to understand a solution to this situation a little bit better?
<p style="margin-bottom:18px; padding-right:0px; outline:0px; font-size:13px; vertical-align:baseline; background-color:#f0f3f4; color:#222222; font-family:Segoe UI,Tahoma,Arial,Helvetica,sans-serif; line-height:18.200000762939453px
Thank you in advance, I appreciate any pointers you may be able to offer.

View the full article
 
Back
Top