4.10.7Object SkinBinder

Binds a variable with a skin.

Object SkinBinder

Skin binders automatically search for skin files in the service home direcory(es).

The skin variable is searched in the service configuration file. If it's a function, then is set as the skin function; if it's a string, then the given skin file is searched in the proper service directory.

If the variable is not found in the service configuration, then a file named after the variable is searched in the service directory. In short, it's like having a default for the skin variable being the same as the skin file name (and extension ".fal", ".ftd" or ".fam").

The skin file search order is the following:

The skin module must expose a function named "skin" at its topmost level.

All the services have in their base class a default skin variable called "skin".

If the skin name is explicitly set in the configuration file, an error will be raised in case it is not found. Otherwise, the skin load will just silently fail.

A skin can also be explicitly disabled setting the value to nil.

It is possible to "disarm" the default "skin" property by simply setting it to nil in the class declaration (may be useful for skin-less services to reduce the startup overhead).

Methods
getSubSkinLoads the required skin for the required service.

Methods

getSubSkin

Loads the required skin for the required service.

getSubSkin( skinFile, srv )
skinFile The name of the skin module to be searched.
srv A service willing to load te skin
ReturnThe skin callable exposed by the loaded module or nil on failure.
Raise
IoError on errors opening modules.
CodeError on module compilation or link errors.

See also: serivce_skin.

Made with http://www.falconpl.org