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
kvision
  • a

    Adam S

    09/03/2022, 4:56 PM
    hi, I'm trying to figure out Navigo, but I'm having trouble getting it working. When I click on a link, I always get
    Cannot GET /servers/test-server
    I've set up the routing...
    fun init() {
        routing
          .on("/", { _ ->
            println("routing.on HOME")
            homepageView()
          })
          .on("/servers/(.*)", { match ->
            println("routing.on SERVER $match")
            val serverId = match.data[0] as? String ?: error("invalid server id")
            println("routing.on SERVER serverId:$serverId")
            serverView(serverId)
          }
          )
          .resolve()
      }
    And I think I'm creating the link correctly
    listTag(ListType.UL) {
            state.serverIds.forEach { serverId ->
              li {
                div {
                  link(
                    label = "$serverId",
                    dataNavigo = true,
                    url = "/servers/$serverId",
                  )
                }
              }
            }
          }
    I can see in the logs that Navigo seems to be aware of the routes, and is printing
    routing.on HOME
    , but it never prints
    routing.on SERVER
    [WebsocketService] init <ws://localhost:3000/kafkatorio/ws>, 
    kotlin-kotlin-stdlib-js-ir.js?46ac:19385 routing.on HOME
    index.js?0118:551 [webpack-dev-server] Hot Module Replacement enabled.
    index.js?0118:551 [webpack-dev-server] Live Reloading enabled.
    kotlin-kotlin-stdlib-js-ir.js?46ac:19385 [WebsocketService.handleMessageEvent] non-json message elapsed 2h 53m 46.078512299s
    test-server:1          GET <http://localhost:3000/servers/test-server> 404 (Not Found)
    Navigated to <http://localhost:3000/servers/test-server>
    I've tried using different matcher styles (regex, path IDs, plain strings) but nothing seems to work. A full example might help. The best example I've found was here: https://github.com/rjaros/kvision-realworld-example-app-fullstack/, but that's using the older version of Navigo. There's another usage in the KVision examples repo, but it's more simplistic.
    • 1
    • 1
  • r

    Robert Jaros

    09/04/2022, 8:00 PM
    Add
    config.devServer.historyApiFallback = true
    to
    webpack.config.d/webpack.js
    a
    • 2
    • 22
  • n

    napperley

    09/06/2022, 1:27 AM
    Data binding isn't explained very well in the official documentation. Some strange issues have been encountered when doing data binding that involves using some basic conditional checks. As a result the state changes in unpredictable ways. Here is the project where the issues are being encountered: https://gitlab.com/napperley/todo-list
    r
    • 2
    • 10
  • t

    Tomas Kormanak

    09/06/2022, 8:14 AM
    Hi, I updated a project to version 5 and have strange issue with bootstrap select input. It shows the selected value twice options(list of string pairs)
    1 = One
    2 = Two
    results in this in DOM
    <div ...>OneOne</div>
    r
    • 2
    • 5
  • t

    Tomas Kormanak

    09/06/2022, 11:18 AM
    I manage to upgrade 5.6.1, but 5.7.x cause this issue:
    Converted messages-en.po to messages-en.json
    internal/modules/cjs/loader.js:883
      throw err;
      ^
    
    Error: Cannot find module 'XXX/build/js/node_modules/gettext.js/bin/po2json'
    I thought it's a problem only in 5.7.0 as release notes says "It is broken" but I have the same issue in all 5.7.* versions
    r
    • 2
    • 7
  • a

    Adam S

    09/06/2022, 8:35 PM
    I'm stuck on Navigo again. Now the matcher isn't picking up
    /servers/test-id
    at all...
    routing
          .on("/", {
            log("routing.on HOME")
            homepageView()
          })
          .on(("/servers/(.*)"), { match ->
            println("routing.on SERVER $match")
            val serverId = match.data[0] as? String ?: error("invalid server id")
            println("routing.on SERVER serverId:$serverId")
            serverView(FactorioServerId(serverId))
          }
          )
    I can see
    routing.on HOME
    logged, but
    routing.on SERVER
    isn't logged. It was earlier! I've no idea what's wrong...
    r
    • 2
    • 21
  • r

    Robert Jaros

    09/07/2022, 2:09 PM
    Anyone here ever used websocket support in KVision fullstack interfaces?
    a
    • 2
    • 1
  • d

    David West

    09/08/2022, 10:59 AM
    Hello! Would it be possible to position elements in a
    FlexPanel
    like this: [
    Div1
    Div2
    (space in the middle)
    Div3
    Div4
    ]
    r
    • 2
    • 4
  • r

    Robert Jaros

    09/11/2022, 9:44 AM
    I've implemented a new fullstack module for Ktor with Koin dependency injection instead of Guice. It will be available in the next release. Perhaps someone here has a Ktor fullstack app and is willing to migrate to Koin?
    a
    • 2
    • 1
  • r

    Robert Jaros

    09/12/2022, 3:48 PM
    message has been deleted
  • r

    Robert Jaros

    09/12/2022, 3:58 PM
    The new
    kvision-datetime
    module contains
    DateTime
    and
    DateTimeInput
    components which have almost the same API as the old ones (from the
    kvision-bootstrap-datetime
    module). It should a drop-in replacement for the old module with just a few names changed. The new components are also fully usable without Bootstrap, even without any CSS applied (note: Fontawesome module should be included).
  • r

    Robert Jaros

    09/12/2022, 4:10 PM
    I've implemented new way of using Service and ServiceManager classes in fullstack projects. Until now the project had to use instances of classes and objects, which were generated by the KVision plugin. The project could not be compiled in IDE without running gradle task first. Now instead of using these classes and objects new functions can be used with only a service interface as a type parameter. Instead of
    PingService()
    we can use
    getService<IPingService>()
    and instead of
    PingServiceManager
    we can use
    getServiceManager<IPingService>()
    (there are even helper functions
    getAllServiceManagers()
    and
    getServiceManagers(vararg ...)
    which return lists of objects). As a result the application can now be fully compiled in IDE, even without any gradle runs. I've converted some example apps to this method (but not all, there are so many 😉)
    • 1
    • 1
  • r

    Robert Jaros

    09/12/2022, 4:27 PM
    As for Koin integration I've pushed new sample apps to the examples repository. I've experimented with a few different ways to integrate and have chosen the one working best with new constructor DSL from Koin 3.2. I'll update the guide soon, but for now here are some rules: • you need to create a definition for every service class in one or more modules, and pass the modules to
    kvisionInit()
    function (Koin doesn't have any implicit or just-in-time bindings) • if your service class needs access to the Ktor's
    ApplicationCall
    (e.g. for authentication) you have to add the call as constructor parameter of the service and use constructor DSL with
    factoryOf(::ClassName)
    function • the same applies to components with ApplicationCall injected into other components - eager or constructor injection is required • you can use lazy evaluated injection or other scopes (e.g. single) for services that do not need to work with "ApplicationCall` All these rules are implemented in the https://github.com/rjaros/kvision-examples/tree/master/addressbook-fullstack-ktor-koin example
  • n

    napperley

    09/13/2022, 3:14 AM
    After running the frontendBrowserDistribution Gradle task the following error appears:
    Module not found: Error: Can't resolve 'jquery'
    Is there a Gradle task that needs to be run beforehand to install the dependencies?
    r
    • 2
    • 11
  • r

    Robert Jaros

    09/13/2022, 4:36 PM
    KVision Project Wizard 0.5.0 is available for update from the JB Marketplace.
  • r

    Robert Jaros

    09/14/2022, 5:16 PM
    KVision 5.15.1 is out https://github.com/rjaros/kvision/releases/tag/5.15.1
  • r

    Robert Jaros

    09/17/2022, 12:18 PM
    KVision 5.15.2 is out https://github.com/rjaros/kvision/releases/tag/5.15.2
  • p

    Phil Richardson

    09/18/2022, 2:39 PM
    I was wondering when stabilised, if the new MetaSerializable mechanism in Serialization would be viable approach for custom exception self-registration when used with the full-stack compiler plugin?
    r
    • 2
    • 3
  • r

    Robert Jaros

    09/21/2022, 11:03 AM
    KVision 5.15.3 is out https://github.com/rjaros/kvision/releases/tag/5.15.3
  • t

    Tomas Kormanak

    09/23/2022, 11:36 AM
    Hi, is there a reason why split panel splitter has inline style
    width:9px
    ?
    <div class="splitter-vertical" style="width: 9px;"></div>
    r
    • 2
    • 7
  • t

    Tomas Kormanak

    09/26/2022, 3:20 PM
    Hi, I am having an issue with tab panel. It seems after upgrading 4->5 function
    afterInsert(node:Vnode)
    is not called on tab child component.
    r
    • 2
    • 2
  • r

    Robert Jaros

    09/27/2022, 10:20 AM
    Do you need a form component compatible with
    FormPanel
    container?
    t
    • 2
    • 7
  • r

    Robert Jaros

    10/05/2022, 2:12 PM
    KVision 5.16.0 is out https://github.com/rjaros/kvision/releases/tag/5.16.0
  • n

    napperley

    10/09/2022, 2:43 AM
    Some errors appear after updating Kotlin to 1.7.20 and KVision to 5.16.0, and running the compileKotlinFrontend Gradle task. Below is the build output (trimmed for brevity):
    > Task :kotlinNpmInstall
    warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > css-loader@6.7.1" has unmet peer dependency "webpack@^5.0.0".
    warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > style-loader@3.3.1" has unmet peer dependency "webpack@^5.0.0".
    warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > imports-loader@4.0.1" has unmet peer dependency "webpack@^5.0.0".
    warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > gettext.js > po2json@1.0.0-beta-3" has unmet peer dependency "commander@^6.0.0".
    warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > gettext.js > po2json@1.0.0-beta-3" has unmet peer dependency "gettext-parser@2.0.0".
    warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > gettext.js > po2json@1.0.0-beta-3" has unmet peer dependency "gettext-to-messageformat@0.3.1".
    warning Ignored scripts due to flag.
    
    > Task :frontendGenerateExternalsIntegrated SKIPPED
    > Task :kotlinStoreYarnLock UP-TO-DATE
    > Task :transformCommonMainDependenciesMetadata
    > Task :kspCommonMainKotlinMetadata
    > Task :kspKotlinFrontend
    
    > Task :compileKotlinFrontend FAILED
    
    e: .. build/generated/ksp/metadata/commonMain/kotlin/io/kvision/remote/GeneratedKVServiceManager.kt: (9, 51): Unresolved reference: KVServiceManager
    e: .. build/generated/ksp/metadata/commonMain/kotlin/io/kvision/remote/GeneratedKVServiceManager.kt: (13, 35): Unresolved reference: KVServiceManager
    e: .. build/generated/ksp/metadata/commonMain/kotlin/io/kvision/remote/GeneratedKVServiceManager.kt: (16, 56): Unresolved reference: KVServiceManager
    r
    • 2
    • 9
  • r

    Robert Jaros

    10/10/2022, 11:18 AM
    KVision 5.16.1 is out https://github.com/rjaros/kvision/releases/tag/5.16.1
  • r

    Robert Jaros

    10/23/2022, 1:54 PM
    KVision 5.16.2 is out https://github.com/rjaros/kvision/releases/tag/5.16.2
  • a

    adonis

    10/24/2022, 10:57 AM
    Hello everybody! I have some questions: Is there any way to use headerFilter as dynamic without jsTabulator, or there will be in the near future?
    r
    • 2
    • 11
  • a

    Adam S

    10/24/2022, 4:12 PM
    I'm using KVision redux and I'm getting this warning in my logs, what the best way to conditionally make Redux switch to production?
    main.bundle.js:2 You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (<https://github.com/zertosh/loose-envify>) for browserify or setting mode to production in webpack (<https://webpack.js.org/concepts/mode/>) to ensure you have the correct code for your production build.
    I'm using the Gradle task
    browserProductionWebpack
    , is there a way to set an option to that, so it's only production when I'm building for production?
    r
    • 2
    • 10
  • r

    Robert Jaros

    11/01/2022, 7:05 PM
    KVision 5.17.0 is out https://github.com/rjaros/kvision/releases/tag/5.17.0
  • r

    Robert Jaros

    11/07/2022, 4:18 PM
    I hit this quite by accident: Novatec Summit 2022 https://events.zoom.us/ev/Aj_BFO0KxujI1suxZRmrabYs2zhAL3MdcjXdYMntcsfLrCAkdms9~AggLXsr32QYFjq8BlYLZ5I06Dg One of the sessions: "KVision: All about Kotlin" 🙂
Powered by Linen
Title
r

Robert Jaros

11/07/2022, 4:18 PM
I hit this quite by accident: Novatec Summit 2022 https://events.zoom.us/ev/Aj_BFO0KxujI1suxZRmrabYs2zhAL3MdcjXdYMntcsfLrCAkdms9~AggLXsr32QYFjq8BlYLZ5I06Dg One of the sessions: "KVision: All about Kotlin" 🙂
View count: 6