https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
javascript
  • o

    oleksiyp

    11/08/2017, 8:14 PM
    hi. is there a way to test Kotlin (JS) code, so that it's easily integrated with Gradle and IDEA? I've seen https://github.com/epabst/kotlin-showcase/blob/master/webclient/src/test/kotlin/QUnit/qunit.kt and don't understand what it's doing
    i
    • 2
    • 7
  • r

    redrield

    11/10/2017, 3:25 AM
    Hello?
    m
    k
    • 3
    • 6
  • a

    arocnies

    11/10/2017, 3:42 AM
    K/JS noob here: Has anyone successfully converted OpenLayers typescript definitions to kotlin? I've tried with these two definitions and can't seem to get either to work properly. https://github.com/jumpinjackie/jsdoc-typescript-plugin/blob/master/typings/openlayers.baseline.d.ts https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/openlayers/v3/index.d.ts
    k
    • 2
    • 1
  • b

    bashor

    11/10/2017, 10:51 AM
    (thread ^^^)
    d
    • 2
    • 6
  • t

    tlaukkan

    11/11/2017, 6:31 AM
    Good morning 🙂. Weekend project created puzzling error, how to resolve the following ts2kt error: ts2kt: Merging Variable and ??? unsupported yet, a: var Window.VRFrameData: Any get() = definedExternally; set(value) = definedExternally , b: var VRFrameData: Any = definedExternally
    b
    • 2
    • 4
  • j

    jmoo

    11/11/2017, 7:06 AM
    hello all, I’m using the react-kotlin wrappers in my web project. I have a ‘select’ html element, but can’t seem to get the value out of the onChangeFunction event. Has anyone done this and can help me out?
    b
    c
    • 3
    • 2
  • t

    tlaukkan

    11/11/2017, 1:47 PM
    In case someone is interested to tinker with BabylonJS using KotlinJS here is alpha version of bindings: https://github.com/tlaukkan/babylonjs-kotlin
    👍 1
    b
    • 2
    • 2
  • a

    amane.nikaido

    11/13/2017, 3:23 PM
    I create an app with using create-react-kotlin-app. How to use kotlinx.coroutines in my project?
    k
    • 2
    • 8
  • g

    gaetan

    11/13/2017, 4:09 PM
    I think I found a bug on kotlin.js https://try.kotlinlang.org/#/UserProjects/7g3b3r1k6oqfq82ltabjfm44qt/1175fthomfiusfk2n0c268bqc4 When running on the JVM the double conversion to string is always good (with .0). Running as js, the conversion to string doesn’t put the “.0”
    fun main(args: Array<String>) {
        val dbl = 1.toDouble()
        println("M$dbl")  				// M1.0 OK
        println(moveTo(1.toDouble())) 	// M1   KO
    }
    
    fun moveTo(x:Double) = "M$x"
    k
    i
    • 3
    • 27
  • r

    redrield

    11/15/2017, 11:00 AM
    How can I set the id of an element from the kotlin React DSL?
    b
    • 2
    • 2
  • r

    redrield

    11/16/2017, 2:50 PM
    So I stole the configuration of the KotlinConf app, and made a stub ktor project that serves it, but when it serves the root page nothing actually comes up
    b
    c
    • 3
    • 2
  • n

    natpryce

    11/17/2017, 9:46 AM
    Hi. Is there any progress on issue KT-19672? I want to use Kotlin for a web front-end project, but the lack of Promises is a problem.
    k
    • 2
    • 10
  • s

    snrostov

    11/17/2017, 10:52 AM
    I have a problem using kotlin js incremental compilation with webpack watch. When changes occurred kotlin compiler removes target js file before compilation and webpack build fails in watch mode. Is there some workaround?
    k
    • 2
    • 1
  • s

    snrostov

    11/17/2017, 10:54 AM
    Steps: 1. run gradle in continuous mode 2. run webpack --watch 3. wait for first build 4. make changes 5. webpack build error:
    Module build failed: Error: ENOENT: no such file or directory, open ...
    :youtrack: 1
    b
    • 2
    • 4
  • r

    redrield

    11/17/2017, 11:50 AM
    And XMLHttpRequest sends a POST to
    /#/newlog
    instead of
    /newlog
    k
    • 2
    • 5
  • s

    snrostov

    11/17/2017, 12:16 PM
    What is the best way to work in "watch" mode? Kotlin incremental js compilation works fast, but webpack is extremely slow on kotlin std lib (1,5 Mb, ~5s to rebuild in watch mode). Kotlin DCE speeds up webpack build, but slows down incremental js compilation...
    k
    • 2
    • 14
  • l

    lewik

    11/17/2017, 9:07 PM
    How to get value from List from javascript side?
    kotlinArray[0]
    kotlinArray.get(0)
    - not works real method have name
    get_za3lpa
    I am unable to add operator with @JsName
    k
    s
    b
    • 4
    • 10
  • m

    marcinmoskala

    11/18/2017, 3:43 PM
    When I build it, it is starting but not working because it is shouting that it cannot find dependencies:
    k
    • 2
    • 4
  • r

    redrield

    11/18/2017, 9:59 PM
    How should I deserialize JSON into a Kotlin data class?
    g
    • 2
    • 3
  • b

    benleggiero

    11/19/2017, 2:29 AM
    Is there a CDN that will serve
    kotlin.js
    &
    kotlin.meta.js
    for me?
    k
    g
    • 3
    • 6
  • d

    deviant

    11/20/2017, 2:27 PM
    guys, is there typesafe css builder? like it done in #tornadofx
    n
    l
    • 3
    • 2
  • g

    gildor

    11/21/2017, 5:08 AM
    Is there any build-in way for access to
    self
    (DedicatedWorkerGlobalScope) inside Worker? Or just use external declaration for
    self
    ?
    private external val self: DedicatedWorkerGlobalScope
    We have
    kotlin.browser.window
    in stdlib, maybe make sense also add
    kotlin.js.self
    (WindowOrWorkerGlobalScope) or
    kotlin.js.worker
    (DedicatedWorkerGlobalScope)
    :youtrack: 1
    b
    • 2
    • 4
  • n

    nfrankel

    11/21/2017, 10:55 AM
    hey guys this might have been answered before but since there’s not that much history i apologize in advance is there a kotlin equivalent to a top-level anonymous function:
    (function() {
      // My code here
    })();
    k
    l
    • 3
    • 25
  • g

    Greg Stepniewski

    11/21/2017, 8:16 PM
    Wait, hang on. It works properly when I build from console, but not when I build from IntelliJ. Wat?
    b
    i
    • 3
    • 7
  • s

    spand

    11/22/2017, 1:07 PM
    I am trying to setup a common module and a js module that uses data classes defined in the common module but compilation fails with Unresolved reference. Anyone have an example of this working ?
    b
    i
    • 3
    • 4
  • i

    ilya.gorbunov

    11/22/2017, 7:13 PM
    @spand It was considered. Due to some Gradle restrictions one still has to create a separate module for each implemented platform. "depend on that common module directly" -- however that may be supported one day, so that you add a dependency on a common module, and the correct dependency according to the current platform is determined automatically. If you have further questions about multiplatform projects, let's continue in #multiplatform
    s
    • 2
    • 1
  • d

    donhilion

    11/22/2017, 8:36 PM
    Hi! I try to use kotlin with react and I fail to use a 3rd party library. What I'd like to use is react-md. I guess, that I have to use the @JsModule annotation and build my own wrapper classes. Is something like this the right way? (It is not working by the way because the number of parameters is not right.)
    @JsModule("react-md/src/js/Cards/Card")
    external val Card: RComponent<RProps, RState>
    fun RBuilder.card() = child(Card::class) {}
    g
    • 2
    • 13
  • n

    natpryce

    11/24/2017, 2:06 PM
    I was surprised to find that classes cannot implement a function interface on the JavaScript platform. This makes making existing libraries multiplatform difficult. Is this limitation likely to be lifted any time soon?
    k
    b
    • 3
    • 5
  • n

    natpryce

    11/24/2017, 3:21 PM
    Is there a tool to convert Flow type annotations to Kotlin extern definitions?
    b
    • 2
    • 4
  • m

    marcinmoskala

    11/24/2017, 4:07 PM
    Anyone knows how to work on forms in React with Kotlin? I found view on Thinker but this approach is not working (no value property on input). Probably because API changed. https://github.com/Kotlin/kotlin-fullstack-sample/blob/master/frontend/src/org/jetbrains/demo/thinkter/Register.kt
    k
    • 2
    • 11
Powered by Linen
Title
m

marcinmoskala

11/24/2017, 4:07 PM
Anyone knows how to work on forms in React with Kotlin? I found view on Thinker but this approach is not working (no value property on input). Probably because API changed. https://github.com/Kotlin/kotlin-fullstack-sample/blob/master/frontend/src/org/jetbrains/demo/thinkter/Register.kt
k

konsoletyper

11/24/2017, 4:14 PM
https://github.com/JetBrains/create-react-kotlin-app
m

marcinmoskala

11/24/2017, 4:17 PM
I have project build. I don't know how to work on forms
input, textArea etc
k

konsoletyper

11/24/2017, 4:20 PM
I don't know whether Kotlin library engineers sit here
You can try to create issues in corresponding projects on github
Here's another library with react wrappers for Kotlin: https://github.com/JetBrains/kotlin-wrappers
m

marcinmoskala

11/24/2017, 4:25 PM
I am using react.dom
https://github.com/JetBrains/kotlin-wrappers
k

konsoletyper

11/24/2017, 4:26 PM
You can try something like this:
input {
                        attrs { 
                            value = "123"
                        }
                    }
m

marcinmoskala

11/24/2017, 4:31 PM
Close, but this should be ok:
attrs { 
    onChangeFunction = {
        
    }
}
Thanks 🙂
View count: 3