Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

Defining the PlayingNow Property

Let's add one more property, PlayingNow, which indicates whether or not the film is currently playing. It illustrates the use of another built-in data type, %BooleanOpens in a new tab, which accepts values of 0 (for false) and 1 (for true.). The initial value for PlayingNow is 1.

Either add the property directly to Film or use the New Property Wizard.

When you are finished, your Cinema.FilmOpens in a new tab class definition should look something like the following:

Class Cinema.Film Extends %Persistent 
{
/// Title of a film
Property Title As %String [ Required ];

/// Index for property Title
Index TitleIndex On Title;

Property Description As %String(MAXLEN = 300);

Property TicketsSold As %Integer [ InitialExpression = 0 ];

/// Index for property TicketsSold
Index TicketsSoldIndex On TicketsSold;

Property PlayingNow As %Boolean [ InitialExpression = 1 ];

}
FeedbackOpens in a new tab