I am trying to get forms running but run into: ``...
# kvision
j
I am trying to get forms running but run into:
Copy code
Uncaught TypeError: tmp0_safe_receiver.TouchSpin is not a function
    afterInsert_14 neckarIT-ui.js:56336
    invoke_171 neckarIT-ui.js:42550
    factory_82 neckarIT-ui.js:44165
    patch snabbdom.js:300
    patch_1 neckarIT-ui.js:33427
    reRender neckarIT-ui.js:48444
    refresh_23 neckarIT-ui.js:43708
    addInternal_14 neckarIT-ui.js:48692
    add_60 neckarIT-ui.js:48697
    main neckarIT-ui.js:46831
    main$default neckarIT-ui.js:46848
    invoke_816 neckarIT-ui.js:94297
    factory_373 neckarIT-ui.js:94354
    Root_init_$Init$ neckarIT-ui.js:48085
    Root_init_$Create$ neckarIT-ui.js:48090
    root neckarIT-ui.js:48486
    start_1 neckarIT-ui.js:94318
    startApplication$start neckarIT-ui.js:33300
    invoke_125 neckarIT-ui.js:33327
    factory_66 neckarIT-ui.js:33347
    startApplication neckarIT-ui.js:33283
    main_0 neckarIT-ui.js:94327
    <anonymous>
I am trying to bind a double property to a spinner. Any ideas?
r
can you paste your kotlin code?
j
Copy code
val roofSizeFormPanel = formPanel<RoofSizeFormModel>() {
              add(RoofSizeFormModel::width, spinner(label = "Width") {
                max = 5_000.0
                min = 500.0
              }, true)
              add(RoofSizeFormModel::height, spinner(label = "Height") {
                max = 5_000.0
                min = 500.0
              })
            }
Copy code
@Serializable
data class RoofSizeFormModel(
  val name: String = "asdf",
  val width: @mm Double = 77.0,
  val height: @mm Double = 50.0,
) {
r
Hmm ... seems to be working fine for me, with both legacy and ir, 1.4.21 and even 1.4.30.
But you shouldn't use DSL builder
spinner()
with
FormPanel.add()
👍 1
you add the component twice this way try
Spinner(..).apply { ... }
j
I created the Spinner using "Spinner". But the error message is the same
r
Can you share the whole project?