Mercurial > projects > dwt2
comparison base/src/java/beans/PropertyChangeSupport.d @ 112:9f4c18c268b2
Update to compile and execute with dmd 2.052.
author | kntroh |
---|---|
date | Wed, 16 Mar 2011 21:53:53 +0900 |
parents | 1bf55a6eb092 |
children |
comparison
equal
deleted
inserted
replaced
111:b6e9904989ed | 112:9f4c18c268b2 |
---|---|
22 PropertyChangeListener[] list; | 22 PropertyChangeListener[] list; |
23 if( auto l = propertyName in listeners ){ | 23 if( auto l = propertyName in listeners ){ |
24 list = *l; | 24 list = *l; |
25 } | 25 } |
26 list ~= listener; | 26 list ~= listener; |
27 listeners[ propertyName.dup ] = list; | 27 version(Tango){ |
28 propertyName = propertyName.dup; | |
29 } | |
30 listeners[ propertyName ] = list; | |
28 } | 31 } |
29 void firePropertyChange(String propertyName, bool oldValue, bool newValue){ | 32 void firePropertyChange(String propertyName, bool oldValue, bool newValue){ |
30 firePropertyChange( propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue) ); | 33 firePropertyChange( propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue) ); |
31 } | 34 } |
32 void firePropertyChange(String propertyName, int oldValue, int newValue){ | 35 void firePropertyChange(String propertyName, int oldValue, int newValue){ |
53 list.length = tango.core.Array.remove( *list, listener ); | 56 list.length = tango.core.Array.remove( *list, listener ); |
54 } else { | 57 } else { |
55 implMissing( __FILE__, __LINE__ ); | 58 implMissing( __FILE__, __LINE__ ); |
56 } | 59 } |
57 if( list.length > 0 ){ | 60 if( list.length > 0 ){ |
58 listeners[ propertyName.dup ] = *list; | 61 version(Tango){ |
62 propertyName = propertyName.dup; | |
63 } | |
64 listeners[ propertyName ] = *list; | |
59 } | 65 } |
60 else{ | 66 else{ |
61 listeners.remove( propertyName ); | 67 listeners.remove( propertyName ); |
62 } | 68 } |
63 } | 69 } |