Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

SortedFilteredList: ArrayIndexOutOfBoundsException #1044

Open
Kotlin-GDE opened this issue Aug 7, 2019 · 2 comments
Open

SortedFilteredList: ArrayIndexOutOfBoundsException #1044

Kotlin-GDE opened this issue Aug 7, 2019 · 2 comments

Comments

@Kotlin-GDE
Copy link

hi

i have an issue with sortedFiltredList, i have a textfield for searching and tableview bound to this sortedfilteredlist, so when i filter this list using list.predicate = { some data from textfield } i see sometimes exception lie this

java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -4282 is negative

any explaination for this exception and how to fix it

thanks.

@edvin
Copy link
Owner

edvin commented Aug 7, 2019

Please post a code example that exhibits the issue :)

@Kotlin-GDE
Copy link
Author

Kotlin-GDE commented Aug 7, 2019

i have a simple tableview

table = tableview(list) { ...... }

same textfield for filter data

search = textfield { textProperty().addListener { _, _, new -> controller.fetch(search.text) } }

controller

val view = find<ConsultationView>()
val payments = SortedFilteredList<Payment>()

    init {
        payments.bindTo(view.table)
    }

fun fetch(employee: String) {
        runAsync {
            payments.predicate = { it.employee.startsWith(employee, ignoreCase = true) }
        } fail { ..... }
    }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants