Another thing I stumble upon regularly is that it'...
# korge
r
Another thing I stumble upon regularly is that it's hard for me to get code samples working. Maybe I'm missing out on something. But doing the tutorials and looking at the docs is not sufficient for me. So if you have other references please let me know. So for example tweens at: https://korlibs.soywiz.com/korge/animation/#simple-interface when copy the line (apply it to the circleFilled of my previous message)
Copy code
circleFilled.tween(circleFilled::x[10.0, 100.0], time = 1000)
I got the compilation error:
Copy code
'operator' modifier is required on 'get' in 'kotlin.reflect.KMutableProperty0'
Type mismatch.
Required: V2<*>
Found: Double
Can it be that I'm using a version that's newer than when the docs were written?
d
If you place the caret in the
[
and press alt+enter in IntelliJ, it should allow yo the import the get extension method
Since the KMutableProperty is a Kotlin class, the import is necessary for the extension method
Maybe we should state that in the documentation and maybe place a gif showing how to do that
Please, try the alt+enter + import stuff to see if it works for you and let me know
r
OMG, I tried ALT+enter in a lot of places, but not that one. Adding to the docs would help a beginner like me yes
👍 1
Also time should be
Copy code
time = 1000.milliseconds
instead of plain 1000
🪲 1
d
oh, you are right 🙂
r
The other examples did include the
Copy code
.milliseconds
so that I could figure out myself ;)
d
probably outdated. We probably wrote that before inline classes were available on kotlin 🙂 thanks for reporting!
r
Are the docs "open source", I'm happy to create PR's for improvements
d
they are indeed
there is a Suggest Change / Typo button on the top right corner of the page pointing to the right file to edit
👍 1
r
Ok, will do for this page now
🙏 2