Category talk:Wren-event: Difference between revisions

m
→‎Event-driven programming: Now uses Wren S/H lexer.
m (→‎Source code: Fixed syntax highlighing.)
m (→‎Event-driven programming: Now uses Wren S/H lexer.)
 
(One intermediate revision by the same user not shown)
Line 19:
The first line of the sub-class's constructor should always be:
 
<syntaxhighlight lang ecmascript="wren">super(name)</langsyntaxhighlight>
 
to ensure the subclass object is initialized properly. Note that, as static methods are not inherited in Wren, sub-class objects are stored in the Event class's library. One can still determine the actual type of the event using its 'type' property which all objects inherit from the Object class.
 
===Source code===
<syntaxhighlight lang=ecmascript"wren">/* Module "event.wren" */
 
import "./check" for Check
9,476

edits