Skip to content
João Cardoso edited this page Dec 5, 2019 · 6 revisions

Poncho provides multiple methods by default to generated classes. These methods can be defined into three categories:

  • Static, which should only be called by class objects.
  • Instance, which should only be called by frame objects.
  • Flexible, which can be called by both.

Class functionality is defined by adding new methods or overwriting/extending these existing ones.

Static Methods

class:NewClass([frameType] [,name] [,template])

Creates a new class that inherits class, with the given frameType and xml template. If name is a string, generated frames will be given global names with increasing IDs. The class will be abstract if no frameType is provided.

class:New([parent])

Retrieves an inactive frame or generates a new one based on this class.

class:Construct()

Generates a new frame based on this class. Called by class:New.

class:Bind(frame)

Gives any existing frame the proprieties of belonging to class. Called by class:Construct.

class:IsAbstract()

Returns whether the class is abstract (incapable of generating frames, only defined for inheritance).

Poncho-2.0 🎽

Documentation
Quick Introduction
API Reference

Feedback
Post an issue

Clone this wiki locally