https://kotlinlang.org logo
#tornadofx
Title
# tornadofx
p

Pedro González

04/22/2020, 3:09 PM
Within a Tableview cellformat, is there a way to get a reference to the itwm from where de data is displayed? (In the examples of the guide, get a reference to the Person)? Also, is there a something like a rowFormat, which would apply the sam format to all cells in the same row?
d

Dustyn

04/22/2020, 3:15 PM
within cellformat you have access to item and itemProperty, thats not what you need?
p

Pedro González

04/22/2020, 3:21 PM
I think so. Will try it out. I think I'm gonna have to get some training into how to discover apis XD
d

Dustyn

04/22/2020, 3:23 PM
the guide has almost all essential information 🙂 but ctrl+space in intellij hellps also to discover possibilities within the scope
p

Pedro González

04/24/2020, 12:37 AM
Hum, after all it wasn't what I needed. Item and itemproperty refer to the a property and its value, not to the "owner" of the property
So, if inside the Person::ageProperty, item refers to age (Int) not to the Person itself, which is what I want
d

Dustyn

04/24/2020, 5:08 AM
Uhm not sure if i know what you mean - could make a gist?
Here I solved my need adding a "selfProperty" to my domain objects, whose value is always "this" - the object instance itself. But I feel there some way to do it without the workaround, just don't know how.
(also excuse the syntax errors, was writing on a hurry)
From an issue in github, I found that rowitem was what I needed. Yay!