E
Edward Diener
How does one specify in a component that a property is a pointer to another
component ? How is this different from a property that is actually an
embedded component ? Finally how is one notified in a component when another
component is destroyed ?
I have a managed component called P. Let us say that C is another managed
component. If on P I have:
__property C * get_CComp();
__property void set_CComp(C *);
Does this mean that my property is a pointer to CComp or does this mean that
my property is an actual CComp ? If the former, which seems like it should
be correct, how would I have a property which is an embedded CComp, since
CComp is a component which must be accessed through its pointer ? Or is is
that only __value classes can be embedded in a component and not another
__gc class ?
If CComp * is a pointer to a component, how I am notified if CComp is
destroyed, or is a moot point since as long as I hold a pointer to CComp it
is never destroyed by the GC ? If the latter is the case, I may still be
trying to use some functionality on CComp after it has been, let's say,
removed from a windows form. How does this effect my pointer, or does the
windows form container automatically set CComp back to 0 if that happens ?
component ? How is this different from a property that is actually an
embedded component ? Finally how is one notified in a component when another
component is destroyed ?
I have a managed component called P. Let us say that C is another managed
component. If on P I have:
__property C * get_CComp();
__property void set_CComp(C *);
Does this mean that my property is a pointer to CComp or does this mean that
my property is an actual CComp ? If the former, which seems like it should
be correct, how would I have a property which is an embedded CComp, since
CComp is a component which must be accessed through its pointer ? Or is is
that only __value classes can be embedded in a component and not another
__gc class ?
If CComp * is a pointer to a component, how I am notified if CComp is
destroyed, or is a moot point since as long as I hold a pointer to CComp it
is never destroyed by the GC ? If the latter is the case, I may still be
trying to use some functionality on CComp after it has been, let's say,
removed from a windows form. How does this effect my pointer, or does the
windows form container automatically set CComp back to 0 if that happens ?