Jump to content

Category talk:Wren-event: Difference between revisions

m
→‎Event-driven programming: Added quotes to 'lang' attribute & fixed another one I missed before.
m (→‎Source code: Fixed syntax highlighing.)
m (→‎Event-driven programming: Added quotes to 'lang' attribute & fixed another one I missed before.)
Line 19:
The first line of the sub-class's constructor should always be:
 
<syntaxhighlight lang ="ecmascript">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">/* Module "event.wren" */
 
import "./check" for Check
9,486

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.