https://kotlinlang.org logo
#stdlib
Title
# stdlib
j

jimn

11/11/2019, 9:12 AM
when i run this.iterator() which calls invoke(Int) should i assume origin is the vtable for IDataframe::invoke(Int) ? do i need to manually delegate each method i wish to expose if I iwsh to use specialized methods I write in the delegator ?
Copy code
class FrameGrouper(
    private val origin: IDataFrame,
    vararg val gby: Int
) :  IDataFrame  by origin  {
    override fun invoke(row: Int) =...}
k

karelpeeters

11/11/2019, 10:30 AM
Can you show some more complete code? Why would
this.iterator()
call
invoke
? And where do vtables come it?
j

jimn

11/11/2019, 10:31 AM
i am debugging it now. "by origin" is a total headache.
Untitled
k

karelpeeters

11/11/2019, 10:35 AM
That's a lot of code...
j

jimn

11/11/2019, 10:36 AM
yeah the delegation is really causing me to backtrack every method in the origin class and make a delegator method even if its the same code
it's better if i make the delegation manual here since they are doing different things under the hood
h

Hullaballoonatic

11/11/2019, 10:21 PM
@jimn btw format code by wrapping with ` or ```
2 Views