![]()  | 
	
		
			
  | 
	|||||||
![]()  | 
	
	
| 
		 | 
	Thread Tools | Rate Thread | Display Modes | 
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			When I registered a callback function for a proximity event [manager.onEnter(sensor,EnterProximity)], how can I later remove that callback, and how to disable/enable it? 
		
		
		
		
		
		
		
		
	
	Or is there another way to accomplish this using different registration of a proximity event?  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			You can get a handle to the event and then enable, disable, or toggle its state: 
		
		
		
		
		
		
		
		
	
	Code: 
	enterEvent = manager.onEnter(sensor, EnterProximity)
exitEvent = manager.onExit(sensor, ExitProximity)
vizact.onkeydown('1',enterEvent.setEnabled,viz.TOGGLE)
vizact.onkeydown('2',exitEvent.setEnabled,viz.TOGGLE)
 | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Thanks, Jeff! Your help is very appreciated.
		 
		
		
		
		
		
		
		
		
	
	 | 
![]()  | 
	
	
		
  | 
	
		
  |