Echo Hollow

Gender-Bending Interactive Stories! :D

User Tools

Site Tools


smutbook:classes:api:defineobj

This is an old revision of the document!


defineObj( id, objectClass=PersistentObject, defaults={} )

Define an object in the defaults datastore. Redefinition is not allowed.

  • Type: Function
  • Arguments:
    • id: A unique string id for this object. A-Za-z0-9_ are allowed.
    • objectClass: The class of the object. This must be SmutBook.Persistence.PersistentObject or a subclass thereof.
    • defaults: A key-value set defining the default field values of this object.
  • Returns: a Proxy-wrapped instantiation of the defined object.
  • Throws: Error if an object of the given id has already been defined.
smutbook/classes/api/defineobj.1787683975.txt.gz · Last modified: by lee