remove_callback(+Source, +EventName, +DestinationClause)

This built-in predicate removes a callback between a Source instance and a Destination clause. The source object is the object which generates the event and the EventName must be the name of a documented event like 'OnSize' or 'OnCreate'. The DestinationClause method must be the name of a public clause. This predicate is part of the Windows API of Trinc-Prolog.

see also: add_callback/3 add_callback/4 callbacks class_name/2 clear_var/1 del_obj/1 get_instance/2 instance/1 new_obj/2 new_obja/2  ispresent_callback/4 object-oriented prolog <-/2 ::<-/1 ::<-/2 this/1

Examples
this(T),
remove_callback(T, onCreate, doCreate),
remove the callback between the 'onCreate' event of an instance and the clause 'doCreate'
remove_callback(Instance, onBeforeSwitch, beforeSwitch) remove the callback between the event 'onBeforeSwitch' of a control window and the clause 'beforeSwitch'

 

Exceptions
Source and/or Destination are empty variables an instantiation_error exception is thrown
Source does not refer to an instance of a class a type_error(class_instance, Var) exception is thrown
EventName and/or DestinationClause are not atoms or variables containing atoms a type_error(atom, Name) exception is thrown
No event with the same name as EventName existence_error(class_method, Var) is thrown

 

 

info@trinc-prolog.com