https://kotlinlang.org logo
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
tornadofx
  • e

    edvin

    01/21/2018, 1:06 PM
    Neat trick to toggle between views: Use the empty state of the viewmodel as a toggle: https://github.com/edvin/tornadofx/issues/600
    a
    • 2
    • 2
  • k

    kristofdho

    01/21/2018, 2:46 PM
    override fun updateModel(json: JsonObject)
  • p

    poohbar

    01/22/2018, 1:44 PM
    so why exactly does TornadoFX include another implementation of JSON support when it could just use one of the existing rock-solid implementations?
    👍 1
    k
    • 2
    • 1
  • h

    hestad

    01/23/2018, 6:57 PM
    I am trying to make a responsive tilepanel with responsive images by ´fitToWidthProperty().bind(halfStagewidth)´. My first thought was something like
    val halfStagewidth = SimpleDoubleProperty(primaryStage.width/2.0)
    , but the required type is
    ObservableValue<out Boolean!>!
    , any ideas?
    a
    • 2
    • 9
  • e

    edvin

    01/23/2018, 9:52 PM
    @jkbbwr It probably is missing some listeners to support direct manipulation like that. I don't have time to look at it now though, can do it tomorrow, gotta run!
    j
    • 2
    • 1
  • e

    edvin

    01/24/2018, 7:24 PM
    I'm trying to compile against the latest Kotlin plugin to see if that helps.
    n
    • 2
    • 2
  • e

    edvin

    01/27/2018, 10:17 AM
    @kastork I think I've done several, this is one of them:

    https://www.youtube.com/watch?v=1G1OYBRDSBs▾

    k
    • 2
    • 4
  • a

    amanda.hinchman-dominguez

    01/27/2018, 9:41 PM
    I'm almost done, it will be up shortly
    k
    • 2
    • 1
  • a

    amanda.hinchman-dominguez

    01/27/2018, 10:44 PM
    I'm going to make an errand run and I'll probably need to upgrade on here but I'll be back on tonight
    k
    • 2
    • 4
  • c

    carlw

    01/29/2018, 2:41 PM
    The bind() function registers change listeners on the Observable which is the bind target. The Observable has a reference to the underlying list. For example, bind() to an FXCollections.observableArrayList() might be based on a java.util.Collections list. Memory leaks can definitely be a concern with listeners. It's in the documentation. So, you should be using WeakInvalidationListener to provide a way for the JVM to resolve conflicts where there is a bi-directional relationship. "Weak" flags one side to give way to the conflict. It's standard in languages like Objective-C. bind() isn't a concern if the binding is going to persist for the life of the app. Where is might be an issue if you are binding from one temporary window to objects in another temporary window bi-directionally such as trying to keep the two in sync. In these cases, you roll-your-own binding by adding a change listener that will explicitly be removed or automatically removed with a WeakInvalidationListener. You might find this post of interest on the topic. http://bekwam.blogspot.com/2015/08/invalidationlistener-not-called.html
    r
    h
    • 3
    • 6
  • c

    Carlton Whitehead

    01/30/2018, 4:17 PM
    Could this be related? https://github.com/TestFX/TestFX/issues/432
    r
    • 2
    • 1
  • e

    edvin

    01/30/2018, 5:17 PM
    @kastork Disregard, I confused myself 🙂 Checking a theory now.
    k
    • 2
    • 1
  • m

    mariofelesdossantosjr

    01/31/2018, 5:34 PM
    @abhinay as?
    a
    • 2
    • 7
  • m

    mariofelesdossantosjr

    01/31/2018, 5:57 PM
    TornadoFX has some TextField format that only accepts numbers?
    c
    e
    • 3
    • 2
  • e

    edvin

    02/01/2018, 4:37 PM
    @Carlton Whitehead @kastork Thanks guys 🙂 I'm sick, so just checking in. Should I merge the PR now or wait?
    c
    k
    • 3
    • 26
  • k

    kastork

    02/01/2018, 7:47 PM
    Unity does a pretty good job with that sort of thing, but I find the UI very hard to look at because they don't allow you to adjust the size of things any larger than 21 year old vision.,
    👍 1
    i
    • 2
    • 1
  • t

    thomasnield

    02/01/2018, 9:24 PM
    @carlw @edvin @nimakro yes I am planning on coming. I am working on my proposal right now. I'll come whether it gets accepted or not.
    n
    • 2
    • 1
  • a

    amanda.hinchman-dominguez

    02/03/2018, 8:45 PM
    I still have a ton of refactoring to do but I'll have to take an objective look once it's all done. Next update to my github repo will include automatic resizing for dropping tiles onto large grid tiles
    👍 1
    a
    • 2
    • 5
  • e

    edvin

    02/04/2018, 9:16 PM
    @jmmk You can detect a click on the tableview and deselect if there is no item in the row below the cursor, or if the cursor is not over a row. To allow blank rows to be selected would be bad though.
    j
    • 2
    • 5
  • e

    edvin

    02/07/2018, 11:40 AM
    @BenjaVR @r4zzz4k Absolutely. We could even merge this library with TornadoFX when it matures. This could be a killer feature to have by default.
    n
    b
    r
    • 4
    • 11
  • b

    bkenn

    02/07/2018, 4:49 PM
    Is TornadoFX using internals to get type safe css to work?
    r
    • 2
    • 1
  • e

    edvin

    02/08/2018, 7:28 AM
    I've created the TornadoFX organization, so we can start moving projects in there. Suggestions for project name for the material design project?
    🎉 1
    b
    b
    • 3
    • 2
  • r

    r4zzz4k

    02/08/2018, 2:21 PM
    @nimakro any chance you can put the code into the personal repo which will eventually be moved into the discussed incubator organization?
    n
    b
    • 3
    • 6
  • r

    r4zzz4k

    02/09/2018, 2:34 PM
    Tried that, got skin from service provider stylesheet and color from my own (I assume app stylesheet overrides service provider one). I didn't expect this to work, so I just want a confirmation I'm seeing proper results :)
    a
    • 2
    • 1
  • e

    edvin

    02/09/2018, 2:47 PM
    It looks like I'll finally get around to making a TornadoFX Database sample app 🙂 Will work on it this weekend.
    😄 1
    b
    • 2
    • 2
  • e

    edvin

    02/09/2018, 7:29 PM
    I realize now why people ask about databases. You need to decide about how to control the life cycle of connections and transactions, and the framework doesn't provide you with any support here.
    😉 1
    n
    • 2
    • 2
  • e

    edvin

    02/09/2018, 8:19 PM
    @chrbongardt For that reason I always prefer to use JavaFX Properties in the domain objects. Not doing so is simply fighting an uphill battle against JavaFX itself.
    k
    • 2
    • 2
  • e

    edvin

    02/10/2018, 2:41 PM
    Did you guys see the image I uploaded of the DB Activity Indicator? I think it doesn't show up because the storage for the slack space is used up.
    n
    • 2
    • 2
  • a

    amanda.hinchman-dominguez

    02/10/2018, 7:23 PM
    Somehow, iteration in datagrid is causing the following output for 44 objects:
    • 1
    • 1
  • a

    amanda.hinchman-dominguez

    02/10/2018, 7:27 PM
    I'll be looking into the source code to see how datagrid is iterating through these objects, but I'm wondering if a property in datagrid could be affecting iteration somehow? i.e.
    maxCellsInRow=2
    a
    • 2
    • 8
Powered by Linen
Title
a

amanda.hinchman-dominguez

02/10/2018, 7:27 PM
I'll be looking into the source code to see how datagrid is iterating through these objects, but I'm wondering if a property in datagrid could be affecting iteration somehow? i.e.
maxCellsInRow=2
a

abhinay

02/11/2018, 3:51 AM
Are you worried about the duplicate prints of the same element?
a

amanda.hinchman-dominguez

02/11/2018, 9:54 PM
@abhinay yeah, the second part is what is appearing in the UI
a

abhinay

02/12/2018, 1:35 AM
I could help if you can tell me what you are trying to achieve here..
a

amanda.hinchman-dominguez

02/12/2018, 1:51 AM
sure! I've rendered a datagrid in the gui where you can drag and drop premade tiles
the first print out is all the tiles
the second is what the datagrid renders, for some reason 😶
a

abhinay

02/12/2018, 2:04 AM
@amanda.hinchman-dominguez Can you post some code which you use to find out what datagrid renders?
a

amanda.hinchman-dominguez

02/12/2018, 2:18 AM
sure!
View count: 4