Interface

# ActionNotificationReceiver

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

An `ActionSource</api/language/actionsource>` object calls the PerformAction method of each <span class="title-ref">ActionNotificationReceiver</span> registered with it.

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                      | Parameters | Returns | Shared |
|-----------------------------------------------------------|------------|---------|--------|
| `PerformAction<actionnotificationreceiver.performaction>` |            |         |        |

## Method descriptions

<div id="actionnotificationreceiver.performaction">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

ActionNotificationReceiver.PerformAction

**PerformAction**

> The method called for this receiver to run its action.

## Notes

If you implement this interface in your application, you must implement the methods with the parameters as shown here.

## Sample code

If you want to have a DesktopButton call PerformAction on an <span class="title-ref">ActionNotificationReceiver</span> then you would create a new class (perhaps ActionNotificationTest) that implements <span class="title-ref">ActionNotificationReceiver</span>. In the PerformAction method, you add the code you want to run when the button is clicked (and before `DesktopButton<desktopbutton.pressed>`.Pressed-Event is called). For example:

``` xojo
MessageBox("PerformAction called.")
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Now in the `Opening<desktopcontrol.opening>` event handler for a DesktopButton, you can add your receiver:

``` xojo
Var action As New ActionNotificationTest
Me.AddActionNotificationReceiver(action)
```

## Compatibility

|                       |                       |
|-----------------------|-----------------------|
| **Project Types**     | Console, Desktop, Web |
| **Operating Systems** | All                   |

<div class="seealso">

`ActionSource</api/language/actionsource>`

</div>
