At 14:46 2013-11-06, Richard Kaye <[email protected]> wrote:

[snip]

Or you can have a form level property that stores a reference to your form grid and set it in the form INIT.

I want better encapsulation. Putting a grid reference at the form level violates this, and it would cause trouble if I ever had more than one grid on a form.

Thisform.gridref= thisform.pageframe1.page3.mySpecialCoolGrid
<other init code>

I do something similar to this where I've subclassed my baseform class as baseformwithgrid. It has a bunch of properties and methods in the form container that I need to make various bits of grid magic happen. If I know a form is going to use a grid I create the form based on that subclass.

Is that what you're looking to achieve?

I am trying to do it in a way that does not depend on object properties as in your example
          thisform.pageframe1.page3.mySpecialCoolGrid
I am looking for an approach to solve this problem in general.

I think I might just end up using this as a parm to the addobject()s for instantiating the input controls. I have not used object references much other than as local variables so I have avoided the problems with dangling references (which I have read of many times over the years). Now, I get to walk the minefield?

[snip]

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to