Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation fixes #2805

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions extensions/dialog/internal.m
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static int colorPanelHide(lua_State *L) {

#pragma mark - Choose File or Folder

/// hs.dialog.chooseFileOrFolder([message], [defaultPath], [canChooseFiles], [canChooseDirectories], [allowsMultipleSelection], [allowedFileTypes], [resolvesAliases]) -> string
/// hs.dialog.chooseFileOrFolder([message], [defaultPath], [canChooseFiles], [canChooseDirectories], [allowsMultipleSelection], [allowedFileTypes], [resolvesAliases]) -> table or nil
/// Function
/// Displays a file and/or folder selection dialog box using NSOpenPanel.
///
Expand All @@ -332,7 +332,7 @@ static int colorPanelHide(lua_State *L) {
/// * [canChooseFiles] - Whether or not the user can select files. Defaults to `true`.
/// * [canChooseDirectories] - Whether or not the user can select folders. Default to `false`.
/// * [allowsMultipleSelection] - Allow multiple selections of files and/or folders. Defaults to `false`.
/// * [allowedFileTypes] - An optional table of allowed file types. Defaults to `true`.
/// * [allowedFileTypes] - An optional table of allowed file types. Defaults to allowing all types.
/// * [resolvesAliases] - An optional boolean that indicates whether the panel resolves aliases.
///
/// Returns:
Expand Down Expand Up @@ -679,10 +679,10 @@ static int blockAlert(lua_State *L) {
/// * `buttonOne` defaults to "OK" if no value is supplied.
/// * `buttonOne` will also be triggered by pressing `ENTER`, whereas `buttonTwo` will be triggered by pressing `ESC`.
/// * Examples:
/// `hs.dialog.textPrompt("Main message.", "Please enter something:")`
/// `hs.dialog.textPrompt("Main message.", "Please enter something:", "Default Value", "OK")`
/// `hs.dialog.textPrompt("Main message.", "Please enter something:", "Default Value", "OK", "Cancel")`
/// `hs.dialog.textPrompt("Main message.", "Please enter something:", "", "OK", "Cancel", true)`
/// * `hs.dialog.textPrompt("Main message.", "Please enter something:")`
/// * `hs.dialog.textPrompt("Main message.", "Please enter something:", "Default Value", "OK")`
/// * `hs.dialog.textPrompt("Main message.", "Please enter something:", "Default Value", "OK", "Cancel")`
/// * `hs.dialog.textPrompt("Main message.", "Please enter something:", "", "OK", "Cancel", true)`
static int textPrompt(lua_State *L) {
NSString* defaultButton = @"OK";

Expand Down
2 changes: 1 addition & 1 deletion extensions/timer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--- Execute functions with various timing rules
---
--- **NOTE**: timers use NSTimer internally, which will be paused when computers sleep.
--- Especially, repeating timers won't be triggered at the specificed time when there are sleeps in between.
--- Especially, repeating timers won't be triggered at the specified time when there are sleeps in between.
--- The workaround is to prevent system from sleeping, configured in Energy Saver in System Preferences.

local module = require("hs.timer.internal")
Expand Down
4 changes: 2 additions & 2 deletions scripts/docs/bin/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ def is_actual_parameter(some_text):
parameter_count = len(actual_params)
if parameter_count != sig_arg_count:
warn("SIGNATURE/PARAMETER COUNT MISMATCH: '%s' says %d parameters ('%s'), but Parameters section has %d entries:\n%s\n" % (sig_without_return, sig_arg_count, ','.join(sig_param_arr), parameter_count, '\n'.join(actual_params)))
except:
warn("Unable to parse parameters for %s\n%s\n" % (item["signature"], sys.exc_info()[1]))
except Exception as e:
warn("Unable to parse parameters for %s\n%s\n" % (item["signature"], repr(e)))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (90 > 79 characters)

sys.exit(1)
return module

Expand Down