Wiki

Changes between Version 3 and Version 4 of Raise

Show
Ignore:
Timestamp:
11/22/12 01:00:38 (12 years ago)
Author:
Charles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Raise

    v3 v4  
    11= Raise =  
    22 
    3 Trigger an event to fire with the specified args. 
     3Raises an event which will directly notify any [wiki:Listen listeners] for that event. An event can only be raised for the same class and the same instance. 
    44 
    5 If the event is not null and  any handlers are listening (registered with) [[BR]] 
    6 the event they will be invoked after the event has been raised. 
     5The number and types of args given in the raise statement must match those declared in the [wiki:Delegate sig] used as the type for the event being raised with two exceptions: 
    76 
    8 The number and types of args given in the raise statement must match those declared [[BR]] 
    9 in the sig used as the Type for the event being raised. 
     7 1. The `sender` which is always `this` should not be specified. 
     8 2. The event arguments object can be left out if you are happy with a default instantiation. 
     9 
     10This will become more clear in the examples below. 
    1011 
    1112See also [wiki:Listen] and [wiki:Ignore]. 
     
    154155}}} 
    155156 
     157== Notes == 
    156158 
    157 == Notes == 
     159In C#, the programmer must first check if the event is null before invoking it. This is not necessary in Cobra where `raise .someEvent ...` is all that is required. 
     160 
     161== See Also == 
     162 
     163 * [wiki:Listen] 
     164 * [wiki:Ignore] 
     165 * [wiki:AllStatements] 
     166 * [wiki:LanguageTopics]