Actors are objects

If you have solved question 2, you will know that a face is a complex object with many facets. The actor(s) it contains are stored in one facet, which is an object with one field per event. Suppose we have the following code for a button:

;-- see Chapter09/faces-are-objects.red:bt: button "Print me!" [print bt]

Click the button and then scroll down to the end of the console output, you will find the following:

actors: make object! [     on-click: func [face [object!] event [event! none!]][print bt]]

We'll apply it in the following two sections.

Get Learn Red - Fundamentals of Red now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.