-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Closed
Labels
category: documentationDocumentation fix or updateDocumentation fix or update
Milestone
Description
Describe the doc issue
Docs do not say to pass a nullptr for the value pointer. That's a runtime warning the user gets.
The trackbar tutorial does not say how to use the callback's arguments in the C language. The presented callback function doesn't even name its arguments.
Docs also don't say how to pass an initial value, if not via the value pointer, that isn't supposed to be used.
Fix suggestion
Necessary:
- Docs: talk about that
valuepointer, and how to pass an initial value since the pointer's deprecation - Docs: link to the tutorial and at least one decent example, for the sake of demonstrating the use of the callback
- Tutorial: callback function: give the parameters names, use them (just hint at
userdata) in the callback - Tutorial: don't rely on the
valuepointer getting updated, do whatever the current implementation requires to stop complaining about it
Optionally:
- Library: introduce second signature to
createTrackbarwherevalueisn't a pointer but a value, for the initial value
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category: documentationDocumentation fix or updateDocumentation fix or update