Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

events

Syntax

events(ClassName)
events(obj)
e = events(___)

Description

example

events(ClassName) displays the names of the public events for the MATLAB® class classname, including events inherited from superclasses.

example

events(obj) displays the names of the public events for the class of obj, where obj is an instance of a MATLAB class. obj can be a scalar object or an array of objects.

example

e = events(___) returns the event names in a cell array.

Examples

collapse all

Get the names of the public events of the handle class and store the result in a cell array of character vectors.

eventNames = events('handle');

List the events defined by the containers.Map class from an instance of this class.

m = containers.Map('May',70);
events(m)
Events for class containers.Map:

    ObjectBeingDestroyed

Input Arguments

collapse all

Class name, specified as a character vector or string.

Data Types: char | string

MATLAB object specified as a scalar object or an object array.

Output Arguments

collapse all

Event names contained in a cell array of character vectors.

More About

collapse all

Public Events

An event is public when the value of its ListenAccess attribute is public and its Hidden attribute value is false (default values for both attributes). See Event Attributes for a complete list of attributes.

Events Keyword

events is also a MATLAB class-definition keyword. See classdef for more information on class definition keywords.

Introduced in R2008a

Was this topic helpful?