>local oLkUpFormObj
>oLkUpFormObj = createobject( "LkUpParams" )
>
>oLkUpFormObj.FormCaption = "Group.GroupName" && ControlSource
>? oLkUpFormObj.FormCaption
>
>set step on
>? oLkUpFormObj.oCol1.BaseClass && <----------
>? oLkUpFormObj.oCol1.ColSource && <----------
>return && Main
>
>
>***********************************
>DEFINE CLASS "LkUpParams" AS Custom
> FormCaption = "Lookup:"
> * Column objects
> oCol1 = createobject( "GrdCols" )
> oCol1.ColSource = "Group.GroupName" && ControlSource
>ENDDEFINE
>
>
>DEFINE CLASS "GrdCols" AS Custom
> ColSource = ""
>ENDDEFINE
>***********************************
>
Hi Spencer,
I'm not sure I understand your problem, but perhaps the following points would be helpful.
You can create a custom object within another custom object, but not through VFP's Class Designer interface. For this you would use either the AddObject or the NewObject method, e.g. as in the following example:
x = newobject('custom')
x.newobject('y', 'custom')
x.addobject('z', 'custom')
? x.y.class, x.y.baseclass, x.z.class
(displays: Custom Custom Custom)
Note that NEWOBJECT is both a function and a method (as illustrated above), which were introduced in VFP 6.0 SP3, as I recall. The nice thing about NEWOBJECT, as opposed to CREATEOBJECT/ADDOBJECT, is that it allows you to specify the class library explicitly, avoiding SET CLASSLIB hassles.
Also I'm wondering if you're confusing the generic concept of "custom" with VFP's "Custom" base class. Do you really mean to DEFINE CLASS "GrdCols" AS Custom, instead of ... AS Column? Are you trying to create a column or just a description of a column? You realize that there is no native VFP "ColSource" property, right? (A Column class object has a "ControlSource" property, but a Custom class object does not.) I hope this is of some help.
Mike