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

Lua section of manual has bad code examples #16622

Closed
pozix604 opened this issue Apr 15, 2024 · 2 comments · May be fixed by darktable-org/dtdocs#645
Closed

Lua section of manual has bad code examples #16622

pozix604 opened this issue Apr 15, 2024 · 2 comments · May be fixed by darktable-org/dtdocs#645

Comments

@pozix604
Copy link

Describe the bug

Scripting with Lua section has code samples that do not work.

Steps to reproduce

See code sample at https://docs.darktable.org/usermanual/4.6/en/lua/simple-shortcut/.

Expected behavior

Code samples should work

Logfile | Screenshot | Screencast

No response

Commit

No response

Where did you obtain darktable from?

OBS

darktable version

4.6.1

What OS are you using?

Linux

What is the version of your OS?

Debian 12

Describe your system?

Samples do not work. For example, manual has:

darktable = require "darktable"

local function hello_shortcut(event, shortcut)
darktable.print("Hello, I just received '"..event..
       "' with parameter '"..shortcut.."'")
end

darktable.register_event("shortcut",hello_shortcut, "A shortcut that prints its parameters")

Last line should be:

darktable.register_event("hello_short", "shortcut",hello_shortcut, "A shortcut that prints its parameters")

There may be other ones.

Are you using OpenCL GPU in darktable?

None

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

@wpferguson
Copy link
Member

@wpferguson
Copy link
Member

Documentation change submitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants