Problem with events

BlitzMax Forums/BlitzMax Programming/Problem with events

ziggy(Posted 2006) [#1]
Does anybody knows why this code is not throwing properly the event EVENT_GADGETPAIN when the MouseEnter method is called?
 	Method MouseEnter() 
 		Print "ENTER"
 		DrawStatus = 1
		Local ev:TEvent = New TEvent 
 		ev.source = Self
 		ev.id = EVENT_GADGETPAINT
 		ev.Emit

 	End Method 



ziggy(Posted 2006) [#2]
forget it... stupid me, it was just ev.source = self.gadget


ziggy(Posted 2006) [#3]
Anyway, i've noticed that whan using PostEvent, the events are not processed by the EventHook, but when using Event.Emit they are executed imediatly. Is there any way to add events to the event stack and let them be recognized by the EventHook?