Notify
The Notify aspect can be used to add property change notification to a property. This will trigger the notification services specific to the current platform. Its behavior matches the notify modifier for Oxygene properties.
The aspect takes an optional String parameter to define which property name to use; if omitted, the property's own name will be used.
type
MyProperties = public class
public
[Notify] property MyProperty: String;
property MyProperty2: String; notify;
end;
public class MyProperties
{
[Notify] public String MyProperty { get;set; }
}
public class MyProperties {
@Notify var myProperty: String!
}
public class MyProperties {
@Notify public String myProperty { __get; __set; }
}
Implementation Details
- On .NET and the Island-backed platforms this will implement the
INotifyPropertyChanging/INotifyPropertyChangedinterfaces and trigger notifications. - On Cocoa this matches the Key-Value Observation logic
NSObjectimplements. - On Java-based platforms it implements the
addPropertyChangeListenerandremovePropertyChangeListenermethods as described here.
See Also
- Property Notifications
Observerclass in Elements RTLnotifykeyword on Oxygene Properties.