contents   index   previous   next



seEnableDynamicMethod

 

syntax:

   restoreDynamicMethodState

seEnableDynamicMethod(

       secontext se,

       seobject obj,

       semember mem,

       enum whichDynamicCallback whichCallback,

       sebool enable,

       restoreDynamicMethodState restore_state);

where:

se the context the object is a part of

 

obj the object half of the Object,Member pair

 

mem the member half of the Object,Member pair

 

whichCallback which method to enable/disable, this may be any of:

 

SE_GET_CALLBACK

SE_PUT_CALLBACK

SE_HASPROP_CALLBACK

SE_CANPUT_CALLBACK

SE_DELETEPROP_CALLBACK

SE_DEFAULTVALUE_CALLBACK

SE_OPERATOROVERLOAD_CALLBACK

SE_GETBYINDEX_CALLBACK

SE_GETNAMEBYINDEX_CALLBACK

SE_GETMAXINDEX_CALLBACK

SE_ALL_CALLBACK /* all of the above */

 

enable whether to enable dynamic method

 

restore_state NULL for first call in pair, for second call set to value returned by the first call

 

return:

In first call in pair, this returns the value to be passed as retore_state for second call. For second call in pair the return value has no meaning.

 

description:

Enable (if enable is TRUE) the calling of the dynamic method named methodName else disable calling of that dynamic method. These methods are disabled during a callback of that method (i.e. put is disabled while within put to prevent recursion). This is a risky function and not a default part of the API. To enable this API function compile with JSE_ENABLE_DYNAMETH.

 

This function is always used in a pair. For the first call in the pair restore_state should be NULL. For the second call, which will undo the first, restore_state must be the value returned by the first call of the pair.

 

see:

seSetCallbacks

 


seConvert