Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object Within an Object???
Message
From
24/01/2001 22:16:46
 
 
To
24/01/2001 19:05:10
Spencer Redfield
Managed Healthcare Northwest, Inc.
Portland, Oregon, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00468280
Message ID:
00468305
Views:
17
>I really need some guidance. I have just recently begun creating
>custom objects. I thought I could create a custom object that
>itself contains several custom objects.
>
>Background:
>In the Watch Window oLkUpFormObj.oCol1 appears as an object and
>nicely displays its various properties.
>However, I have been unable to access properties such as
>oLkUpFormObj.oCol1.BaseClass using the following syntax from
> 1) My program code
> 2) Command Window or
> 3) Watch Window (oLkUpFormObj.oCol1.BaseClass)
>
>Question:
>Given that the Watch Window nicely displays the properties
>I'm confused. Please see the lines with comment && <----------
>
>Can anyone here set me straight??? Thanks!
>
>
>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
>***********************************
><PRE/>

A column object can only exist within a grid, so you'd need to reference it something like<pre>? oLkUpFormObj.<b>GridName</b>.oCol1.BaseClass  etc.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform