Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I need the entire reference for an object
Message
 
 
To
05/02/1999 14:50:19
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00184477
Message ID:
00184632
Views:
20
Alain,

Here's a recursive routine that takes an object reference as an argument and returns it's full containership name:

* FullName.prg 13-Jun-95

* Generate an object's full containership name

* 03-Dec-95 added additional validity testing
* 26-Apr-96 added testing to handle _VFP object which is its own .Parent
* 15-Jan-98 used IsObject()
* 12-Nov-98 added testing for Name property

function FullName( roObject )

if ( IsObject( m.roObject ) and ;
( type( "roObject.Name" ) == 'C' ) )
if ( ( type( "roObject.Parent" ) == 'O' ) and ;
( roObject.Name != "Microsoft Visual FoxPro" ) )
return ( FullName( roObject.Parent ) + "." + roObject.Name )
else
return roObject.Name
endif
else
return ""
endif

function IsObject
lparameter roObject

return( ( type( "m.roObject" ) == 'O' ) and ( ! isnull( m.roObject ) ) )


>Is there a way to get the entire reference for an object ?
>
>Ex: frmxxx.cntxxx.txtxxx.name
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform