Dockyard > Objective-C Classes > DockyardPlugin

DockyardPlugin

Class Description


Central class for the Dockyard Widget Plugin. DockyardPlugin sets up the preferences instance, controls the list of docks on the reverse side of the widget, and is responsible for the rename, delete, and create actions, as well as providing a beep effect for JavaScript to use.

By Belkadan Software

Methods


- beep

- createDockWithName:dockTemplate:dashboardTemplate:

- deleteDocks:

- hideBackSide

+ isKeyExcludedFromWebScript:

+ isSelectorExcludedFromWebScript:

- showBackSide

- updateTables

+ webScriptNameForSelector:

- windowScriptObjectAvailable:

Method Detail


isKeyExcludedFromWebScript:

+ (BOOL)isKeyExcludedFromWebScript:(SEL)sel

Forbids the widget from accessing any properties.

isSelectorExcludedFromWebScript:

+ (BOOL)isSelectorExcludedFromWebScript:(SEL)sel

Limits the widget to seven methods: showBackSide, hideBackSide, deleteDocks, createDockWithName:dockTemplate:dashboardTemplate:, and beep.

See also: DockyardPreferences+WebKitAdditions.isSelectorExcludedFromWebScript:

webScriptNameForSelector:

+ (NSString *)webScriptNameForSelector:(SEL)sel

Changes Objective-C selectors into JavaScript method names: deleteDocks: becomes deleteDocks (no colon), and createDockWithName:dockTemplate:dashboardTemplate: becomes createDockWithNameAndFiles.

beep

- (void)beep

Expose NSBeep functionality to JavaScript.

createDockWithName:dockTemplate:dashboardTemplate:

- (void)createDockWithName:(NSString *)name dockTemplate:(NSString *)dockTemplate dashboardTemplate:(NSString *)dashboardTemplate

Called by the widget when the user clicks the "create" button. First matches up the given template names with the dock files, then calls createDockWithName:fromFile:dashboardFile: on DockyardPreferences.

deleteDocks:

- (void)deleteDocks:(WebScriptObject *)javascriptIndexArray

Called by the widget when the user clicks the "delete" button. Fetches the selected docks, then calls deleteDocksAtIndexes: on DockyardPreferences.

hideBackSide

- (void)hideBackSide

Called when the widget hides the back side. Hides the table of docks.

showBackSide

- (void)showBackSide

Called when the widget shows the back side. Unhides the table of docks.

updateTables

- (void)updateTables

Forwards the message to the widget to inform it that the list of docks needs updating.

windowScriptObjectAvailable:

- (void)windowScriptObjectAvailable:(WebScriptObject *)windowScriptObject

When this method is called, DockyardPlugin makes both itself and its instance of DockyardPreferences available in JavaScript.

This page was generated with DocYouMeant, a program created by Belkadan Software

Valid XHTML 1.0! Valid CSS!