Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting A Reference To An Object
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01036739
Message ID:
01036896
Views:
9
>Ok, it works.
>
>It now returns a string which is the full hierarcy
>all the way down to the form.
>
>Not what I need. Thanks anyhow

If you know container name, it will be easy to to convert result into the object reference you want.
Another way to rey, is to traverse hierarchy back until you find a container. Something like
DO WHILE .T.
	TRY
		oParent = This.Parent
	CATCH
		oParent = Null
	ENDTRY		
	
	DO CASE
	CASE oParent = Null
		EXIT
	CASE oParent.Class = "Container"
		EXIT
	CASE oParent.Class = "Form"
		EXIT
	ENDCASE
ENDDO
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform