|
发表于 2018-7-20 19:38:02
|
显示全部楼层
回复 5# z20102760
args的确没有用到,只是放在那作为一个place holder。应该是我找参考例子的时候保留的。不影响这个函数的使用。添加menu是通过“deRegUserTriggers”,下面是他的说明文档。你说的方法我没有试过。
deRegUserTriggers
deRegUserTriggers(
t_viewType
[ s_appTrigger [ s_menuTrigger [ s_postInstallTrigger ] ] ]
)
=> t / nil
Description
Registers user application, user menu, and user post install triggers.
A user application trigger is called immediately following the application trigger. (Only root view types can have application triggers, therefore, only root view types can have user application triggers.) A user menu trigger is called before the menu trigger. A user post install trigger is called immediately following the post install trigger.
User triggers are optional and can be defaulted to nil; however, there is no point in registering user triggers if all are nil. This condition, therefore, is flagged as an error. User triggers are described in detail in the next section.
Multiple user triggers can be registered for any given view type. If a user trigger is already registered when deRegUserTriggers is called, a warning message displays. To remove a user trigger associated with a view type, see deUnRegUserTriggers.
Arguments
t_viewType
View type or view subtype to which s_appTrigger, s_menuTrigger, and s_postInstallTrigger will be attached. An application can attach user triggers to any number of view types, but must call deRegUserTriggers once for each one.
s_appTrigger
Symbol for a SKILL function to be called after the application trigger is called. The primary function of this routine is to allow the user to manage any runtime context that might need to be added to customize an existing application. For more information about the user application trigger, see userAppTrigger.
s_menuTrigger
Symbol for a SKILL function to be called before the menu trigger is called. The primary function of this routine is to allow the user to supply any menus that might need to be added to customize an existing application. For more information about the user menu trigger, see userMenuTrigger.
s_postInstallTrigger
Symbol for a SKILL function to be called after the post-install trigger is called. The primary function of this routine is to allow the user to do any processing that might be required after the application has been fully installed and displayed in the window. For more information about the user post install trigger, see userPostInstallTrigger.
Value Returned
t
Registration was successful.
nil
Registration failed.
Example
deRegUserTriggers("schematic" 'myAppTrigger 'myMenuTrigger 'myPostTrigger)
deRegUserTriggers("schematic" nil 'userMenuTrigger)
deRegUserTriggers("schematic" nil nil 'myPostTrigger) |
|