Navigating the Lessons
From any one of the lesson pages, you can navigate around the entire set of lessons in the Klassbook. Many of these are in the nav bar, which will be collapsed on smaller screens — click the navigation button (three lines) to fold open the full nav bar.
The "Prev" and "Next" buttons in the nav bar will step you through the lessons in sequence.
The "breadcrumbs" in the nav bar show you what chapter and lesson you are on. The chapter is a drop-down — click that to jump to the first lesson in another chapter.
Tags will appear on the right of a lesson page. Click on a tag to see a list of titles of lessons that refer to that tag, and click on one of the titles to jump to that lesson.
The "Search" button in the nav bar will bring up a modal list of all of the tags across all of the lessons. Click on a tag to see a list of titles of lessons that refer to that tag, and click on one of the titles to jump to that lesson.
Click on the "?" button in the nav bar, or the "Klassbook" name in the nav bar, to return to this page.
Running the Samples
The bulk of each lesson page is an editor containing some Kotlin code.
After you have reviewed what the code does, click the "Run" button, or press Ctrl-R, to execute that code. The output of that code will appear below the editor.
If you see an "Expand" button above the editor, then some lines of the Kotlin code are being hidden, to focus your attention on the rest. Click the "Expand" button to show the entire Kotlin script.
Playing with Your Own Kotlin
If you would like to edit one of the samples in your Web browser, click the "Edit" button. You will now see the full Kotlin script, and the editor will allow you to make changes.
You can click the "Run" button to run your revised Kotlin code!
However, there are some limitations:
Your Kotlin script cannot be very long.
It will take a while for the Kotlin to be compiled. The "Run" button will show a progress spinner while the compiler is running.
If you have syntax errors, or there are other problems with your code, a compiler error will appear below the editor.
The compiled Kotlin will run in your Web browser. This uses Kotlin/JS, which is a bit different from the Kotlin/JVM that you might use in Android app development. While most things that you will do in Kotlin work on both platforms, some things are platform-specific, so code that might work in an Android project might give you compile errors here in the Klassbook.
The "Scratch Pad" button in the nav bar will take you to a page where you can just play around with Kotlin, without the rest of the lesson UI.
Getting Support
If you run into problems using the Klassbook site, or you have suggestions for how to make Klassbook more useful, reach out!