Add (keyword)
From RemObjects Software
add and remove keywords are used in cases where you want to provide your own logic for adding/removing delegates to and from the event, the following extended syntax can be used:
type TMyClass = class(…) private fMyEvent: EventHandler; method AddMyEvent(aValue: EventHandler); method RemoveMyEvent(aValue: EventHandler); public event MyEvent: EventHandler add AddMyEvent remove RemoveMyEvent; end;
With this syntax, the two specified add and remove methods must conform to the syntax above, they must be procedures and take only one parameter, the matching delegate type. If either provided, both "add" and "remove" must be specified.
See Also
Product: RemObjects Oxygene (formerly known as Chrome)
Current version: 3.0
Previous Versions: 'Joyride' (2.0), 'Floorshow' (1.5), 'Adrenochrome' (1.0)
Glossary — Keywords — Language Features — Platform Features — Samples — Articles — How To — Issues
Categories: Text | Oxygene | Language | Keyword
