KTL Setup - how to add and customize callbacks #52
cortexrd
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A callback is a function that you provide to the KTL so that it can "talk" to your code.
This is used when an event happens, like user interactions (mouse clicks and keyboard keypresses), when the KTL has completed some processing like a scene render, has found one of your custom keywords, has encountered some kind of error, and a lot more.
The KTL_Defaults.js file contains all the callbacks that exist. Those are defined by the KTL, and more are being added as the feature set grows over time.
You can find them between the //KTL callbacks to your App begin/end markers.
Tip: You should browse through that file once in a while to see what's in there and what's new. But much better, you should subscribe to the KTL Changelog discussion to be notified each time a novelty is added. This will save you a lot of reading time.
If you would like to have a specific callback to be added to the KTL, please submit an issue describing what you would need and what's your typical use case.
Adding a Callback
Let's say you don't like the way the auto-focus behaves. The priority is not right for your type of pages.
Hope this helps.
P.S. If someone has some good auto-focus code snippet to share, it would be appreciated.
Normand
Beta Was this translation helpful? Give feedback.
All reactions