eventsystem 1.1.0

Super tiny event system using delegates


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Tiny Event System

Its just 20 lines of code and it supports regular events & cancelable events!

Usage:

import tinyevent;

// Regular event
Event!string onStringChange;
onStringChange ~= (str) { /* Handle new string */ };
onStringChange.emit("Foo");
import tinyevent;

// Cancelable
Cancelable!bool onQuit;
onQuit ~= (force) { return force || !saved; }

// When pressing X:
if(!onQuit.emit(false))
	showUnsavedChangesDialog();
else
	exit();
Authors:
  • webfreak
Dependencies:
none
Versions:
2.0.0 2021-Jun-10
1.3.0 2021-Jun-10
1.2.0 2017-Apr-11
1.1.0 2016-Jan-16
1.0.1 2015-Nov-15
Show all 7 versions
Download Stats:
  • 1 downloads today

  • 6 downloads this week

  • 74 downloads this month

  • 11572 downloads total

Score:
1.7
Short URL:
eventsystem.dub.pm