Name
GetBaseTable -- get name of base table for plugin functions (V5.0)
Synopsis
STRPTR name = GetBaseTable(void);
Function
This function must return the name of a table that should host all the functions this plugin makes available. Functions made available by plugins should always be subsumed under a table so that there won't be any conflicts with existing or future Hollywood APIs and the user will be able to clearly distinguish plugin APIs from inbuilt APIs.

A good base table name is the module name that has been specified in InitPlugin(). For example, if your plugin is called "cooladdon.hwp", then you might want to use "cooladdon" as a base table name. All functions added by GetCommands() will then be stored in a table named "cooladdon".

Starting with Hollywood 7.1 it is possible to return a name that ends in a colon. If that is the case, all functions in the table returned by GetCommands() will be treated as methods. This means that Hollywood will not add them as normal functions but will create a metatable in the form of "modulename.hwp.basetable" instead and set all functions returned by GetCommands() as members of that metatable. The metatable's __index metamethod will also be set to the metatable itself so that you can simply set the metatable to your desired object and calling methods in it will work.

Inputs
none

Results
name
name of a table that should host all functions

Show TOC