Question: I am currently using the AppDelegate in my first iPhone app to handle application level events.

In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.

My AppDelegate gets notified of the state. But what is the best approach to let my UIViews know that they should disable some of their buttons?

What is the standard approach to communicate events from the AppDelegate to the UI screens?

**EDIT**:

My description is slightly wrong, the user can disable the buttons in my app but conditions such as lack of Wi-Fi can as well, so I need to be dynamically able to change the UI state also.

Answer: 
When it comes to dynamic arrays, yes:

```
type
  TIntArray = array of integer;

procedure TForm1.Button1Click(Sender: TObject);
var
  MyArr: TIntArray;
begin
  MyArr := TIntArray.Create(10, 20, 30, 40);
end;

```

When it comes to static arrays, you need to write a helper function:

```
type
  TIntArray = array[0..2] of integer;

function IntArray(const A, B, C: integer): TIntArray;
begin
  result[0] := A;
  result[1] := B;
  result[2] := C;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  MyArr: TIntArray;
begin
  MyArr := IntArray(10, 20, 30);
end;

```

This resembles how the `Point` function creates a `TPoint` record. (Records and arrays are not the same thing, though.)
`[0, 0, 0]` is a set in Delphi. `(0, 0, 0)` is an array constant in Delphi! Just use:

```
HSVtoRGB := (0, 0, 0);

```

(Unless HSVtoRGB is a dynamic array. Did you declare it as `var HSVtoRGB: array[1..3] of integer;` or something similar?