Show
Ignore:
Timestamp:
07/31/08 21:19:39 (5 months ago)
Author:
Chuck.Esterbrook
Message:

Added support for omitting "this" and/or EventArgs?() in a "raise" statement.
Also, added warning that "this" is unnecessary and can be removed.
Also, added more error checking.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Tests/220-delegates-etc/120-events/304-raise-protected.cobra

    r1562 r1566  
    55        event _click as ClickHandler 
    66 
    7         def addClickHandler( clickhdlr as ClickHandler) 
     7        def addClickHandler(clickhdlr as ClickHandler) 
    88                listen _click, clickhdlr 
    99                 
    1010        def _onMouseClick 
    1111                # pretend it's always in our bounds and we're enabled 
    12 #               raise .click(this, EventArgs()) 
    13                 raise _click, this, EventArgs() 
    14 #               raise .click, EventArgs() 
    15 #               raise .click 
    16 #               raise .click, this 
     12                raise _click, EventArgs() 
    1713 
    1814        def receiveMouseClick 
    1915                _onMouseClick 
     16 
    2017 
    2118class Program