xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

HB_QSelf()

Retrieves the self object during method execution.

Syntax

HB_QSelf() --> self

Return

The function returns the self object while methods are being executed. Outside the context of methods, the return value is NIL.

Description

Function HB_QSelf() returns the self object in the context of method execution. This is only rquired when methods are implemented with a FUNCTION or PROCEDURE statement rather than a METHOD statement.

Functions or procedures can serve as method implementation when a method of a class is redefined using EXTEND CLASS...WITH METHOD.

Note:  when HB_QSelf() is called outside the body of a method implementation, the return value is always NIL. Code blocks cannot retrieve the self object with HB_QSelf(). To access the self object within a code block, self must either be embedded in the code block, or it must be passed as a code block parameter.

Info

See also:CLASS, EXTEND CLASS...WITH METHOD, HB_QWith()
Category: Object functions , xHarbour extensions
Source:vm\hvm.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe