Content:MirLua/NamedEvents/Definitions: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
{{#hashdefine:
{{#hashdefine:


CreateHookableEvent | example={{Content:MirLua/Example|code=Examle 1}};; | ;; | =
CreateHookableEvent | example={{Content:MirLua/Example|code=local hEvent = m.CreateHookableEvent('MyEvent')}};; | ;; | =
   
   
}}{{#hashdefine:
}}{{#hashdefine:


HookEvent | example={{Content:MirLua/Example|code=Examle 2}};; | ;; | =
HookEvent | example={{Content:MirLua/Example|code=local hHook = m.HookEvent('MyEvent', function(w, l)
  print('MyEvent is raised!')
end)
}};; | ;; | =
   
   
}}{{#hashdefine:
}}{{#hashdefine:


UnhookEvent | example={{Content:MirLua/Example|code=Examle 3}};; | ;; | =
UnhookEvent | example={{Content:MirLua/Example|code=m.UnhookEvent(hHook)}};; | ;; | =
   
   
}}{{#hashdefine:
}}{{#hashdefine:


NotifyEventHooks | example={{Content:MirLua/Example|code=Examle 4}};; | ;; | =
NotifyEventHooks | example={{Content:MirLua/Example|code=m.NotifyEventHooks(hEvent)}};; | ;; | =
   
   
}}{{#hashdefine:
}}{{#hashdefine:


DestroyHookableEvent | example={{Content:MirLua/Example|code=Examle 5}};; | ;; | =
DestroyHookableEvent | example={{Content:MirLua/Example|code=m.DestroyHookableEvent(hEvent)}};; | ;; | =


}}</includeonly><noinclude>
}}</includeonly><noinclude>
[[Category:Content pages]]
[[Category:Content pages]]
</noinclude>
</noinclude>

Revision as of 22:16, 12 November 2015