BBjNamespace::removeCallbackForVariableChange

Description

In BBj 3.01 and higher, this method removes any callback that has previously been set using BBjNamespace::setCallbackForVariableChange.

Syntax

Return Value

Method

void

removeCallbackForVariableChange(string varName)

Parameters

Variable

Description

varName

Specifies the name of the object being watched.

Return Value

None.

Remarks

None.

Example

namespace! = BBjAPI().getNamespace("test","test",1)

rem 'set a callback that will be called if *any* value in namespace changes
namespace!.setCallbackForNamespaceChange("someValueChanged")

rem 'set a callback that will be called if the value changes
namespace!.setCallbackForVariableChange("x","xChanged")

rem 'set a callback that will be called if *any* value is
rem 'set (even if the value is not changed)
namespace!.setCallbackForNamespace("someValueSet")

rem 'set a callback that will be called if the value of x is set
rem '(even if the values is not changed)
namespace!.setCallbackForVariable("x","xSet")

rem 'remove all callbacks
namespace!.removeCallbackForNamespace()
namespace!.removeCallbackForNamespaceChange()
namespace!.removeCallbackForVariableChange("x")
namespace!.removeCallbackForVariable("x")
end

someValueChanged:
    print "some value in ", namespace!.getName(), " has changed"
return

someValueSet:
    print "some value in ", namespace!.getName(), " has been set"
return

xChanged:
    print "the value of x in ", namespace!.getName(), " has changed"
return

xSet:
    print "the value of x in ", namespace!.getName(), " has been set"
return

See Also

BBjAPI

BBjNamespace

Object Variables

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.