ISCOLOR()

Sys(1272)

This function gives you the complete containership hierarchy for any object. In other words, you hand it an object reference and it'll tell you exactly how to address that object. It's sort of the object version of FULLPATH().

Usage

cCompleteReference = SYS( 1272, oObject )
One of the difficulties in the OOP world is literally getting a handle on things. When you run a form, you may not know the name of the form. _SCREEN.ActiveForm is one solution to this problem, but SYS(1272) gives you more leeway because you can grab the exact reference needed. Try SYS(1272, _SCREEN.ActiveForm.ActiveControl) to see the exact hierarchy for the object with focus.

This function seems useful mostly for debugging and for developer tools, not in production code.

Example

* To see exactly where you are while debugging, try this  * in the Watch window: SYS(1272, SYS(1270)) * As you move the mouse, you can see exactly which control  * you're over with its entire hierarchy.

If you use the example, remember to remove it from the Watch window before you try to close the form. The reference it creates keeps the form from closing.


See Also

ActiveControl, ActiveForm, Sys(1270)


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net