Changeset 348

Show
Ignore:
Timestamp:
05/06/07 13:14:27 (2 years ago)
Author:
keinfarbton
Message:

Fix: handleEvent

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ports/swt-3.2.1/mix/org/eclipse/swt/widgets/Widget.d

    r341 r348  
    44{ 
    55    void handleEvent(Event event) { 
    6         if(func) { 
     6        if(func !is null ) { 
    77            event.cData=cData; 
    88            func(event); 
     
    1717 
    1818public bool handleEvent(Object customData, int eventType, void delegate(Event) func ) { 
    19     if(func !is null ){ 
     19    if(func is null ){ 
    2020        return false; 
    2121    } 
     
    2929 
    3030public bool unhandleEvent(int eventType, void delegate(Event) func) { 
    31     if( func !is null ){ 
     31    if( func is null ){ 
    3232        return false; 
    3333    } 
    3434    auto a = (eventType in __handleEventListeners); 
    35     if( a !is null ){ 
     35    if( a is null ){ 
    3636        return false; 
    3737    } 
    3838    auto b = ( func in *a ); 
    39     if( b !is null ){ 
     39    if( b is null ){ 
    4040        return false; 
    4141    } 
  • trunk/swt-3.2.1-win32/src/org/eclipse/swt/widgets/Widget.d

    r341 r348  
    5353    { 
    5454        void handleEvent(Event event) { 
    55             if(func) { 
     55            if(func !is null) { 
    5656                event.cData=cData; 
    5757                func(event); 
    5858            } 
    5959        } 
    60      
     60 
    6161        void delegate(Event e) func; 
    6262        Object cData; 
     
    6666     
    6767    public bool handleEvent(Object customData, int eventType, void delegate(Event) func ) { 
    68         if(func !is null ){ 
     68        if(func is null ){ 
    6969            return false; 
    7070        } 
     
    7878     
    7979    public bool unhandleEvent(int eventType, void delegate(Event) func) { 
    80         if( func !is null ){ 
     80        if( func is null ){ 
    8181            return false; 
    8282        } 
    8383        auto a = (eventType in __handleEventListeners); 
    84         if( a !is null ){ 
     84        if( a is null ){ 
    8585            return false; 
    8686        } 
    8787        auto b = ( func in *a ); 
    88         if( b !is null ){ 
     88        if( b is null ){ 
    8989            return false; 
    9090        }