Haus
02/14/2018, 11:21 PMmariodroid
02/16/2018, 5:11 AMdata class Foo(var bar: String, var listFoos: MutableList<String>)
val foos = mutableListOf("one", "due", "three")
val pair = Pair(Foo("bar", foos), mutableListOf("ignore", "me"))
val pairCopy = pair.copy()
info { "Pair " + pair.second + "and :" + pair.first.listFoos }
info { "Pair Copy" + pairCopy.second + "and :" + pairCopy.first.listFoos }
pairCopy.second.clear()
pairCopy.first.listFoos.clear()
pairCopy.first.bar = "SUCKIT"
info { "Pair Copy Cleared " + pairCopy.second.toString() + "and :" + pairCopy.first.listFoos.toString() }
info { "Pair: " + pair.second + "and :" + pair.first.listFoos }
info { "Pair Bar property: " + pair.first.bar }
no matter what I do the list on the first pair is cleared, I supposed that the copy method reallocate the pair object, which does work just for no list type
what to do ?raghuramjampala
02/16/2018, 12:05 PMSagarsrao
02/18/2018, 7:12 AMbod
02/18/2018, 12:00 PMjava.lang.VerifyError
crash when my app starts. I think it’s a Kotlin compiler bug, but not sure. I’ve singled out the exact line that makes this happen (if I comment it, it works). The exact error is:
java.lang.VerifyError: Verifier rejected class org.jraf.android.cinetoday.app.loadmovies.LoadMoviesHelper: void org.jraf.android.cinetoday.app.loadmovies.LoadMoviesHelper.loadMovies$app_debug() failed to verify: void org.jraf.android.cinetoday.app.loadmovies.LoadMoviesHelper.loadMovies$app_debug(): [0x4A] 'this' argument 'Reference: java.lang.Object' not instance of 'Precise Reference: org.jraf.android.cinetoday.model.movie.Movie' (declaration of 'org.jraf.android.cinetoday.app.loadmovies.LoadMoviesHelper' appears in /data/app/org.jraf.android.cinetoday-1/base.apk)
And the line causing it is this: val allMoviewFromDbById = allMoviesFromDb.associateBy { it.id }
I know it’s a long shot but… any idea? 😛Daniel
02/18/2018, 2:52 PMdave08
02/19/2018, 12:05 PMShashank Gupta
02/20/2018, 5:07 AMallWarningsAsErrors
to project gradle file and yes now my build has failed with a message e: warnings found and -Werror specified
Mathbl
02/20/2018, 2:11 PMdisconnect
that I could call from anywhere. Disconnect would check if isConnected
and if not, will just do nothing. But the thing is, right now, if disconnect is the first method to be called on that object, it will call init
before calling disconnect...and my init calls connect()
on the object. So that's a bit counterproductive to connect then disconnect right after.gurvinder9
02/20/2018, 2:24 PMrCorbellini
02/21/2018, 10:12 AMwithoutclass
02/21/2018, 4:15 PMMichael Jagielo
02/21/2018, 4:19 PMpablisco
02/22/2018, 8:29 AMfradiati
02/22/2018, 1:36 PMNizzle94
02/23/2018, 3:18 PMjw
02/23/2018, 3:21 PMarekolek
02/24/2018, 1:44 PMLog.d
before the whole RxTextView
part, can you see that printed to logcat?kartikpatodi
02/24/2018, 5:54 PMkoufa
02/24/2018, 6:33 PMrkeazor
02/24/2018, 7:41 PMdevKshitijJain
02/25/2018, 12:22 PMursus
02/25/2018, 5:26 PMJoey Heck
02/26/2018, 6:33 PMneuber
02/27/2018, 2:01 AMBen Piatt
02/27/2018, 5:27 PMfradiati
02/28/2018, 8:02 AMfradiati
02/28/2018, 8:03 AMjw
02/28/2018, 7:29 PMadalbert
02/28/2018, 8:03 PMRxView
from RxBinding ? (I got unresolved reference)
fun RxView.throttledClick(v: View, s: () -> Any) {
this.clicks(v).throttleFirst(1000, TimeUnit.MILLISECONDS).subscribe{s()}
}
I tried to look deeper
@CheckResult
inline fun View.clicks(): Observable<Unit> = RxView.clicks(this).map(VoidToUnit)
But I am still confused why I can't just add extension method. (I am still new to kotlin)adalbert
02/28/2018, 8:03 PMRxView
from RxBinding ? (I got unresolved reference)
fun RxView.throttledClick(v: View, s: () -> Any) {
this.clicks(v).throttleFirst(1000, TimeUnit.MILLISECONDS).subscribe{s()}
}
I tried to look deeper
@CheckResult
inline fun View.clicks(): Observable<Unit> = RxView.clicks(this).map(VoidToUnit)
But I am still confused why I can't just add extension method. (I am still new to kotlin)edwardwongtl
03/01/2018, 3:39 AMadalbert
03/01/2018, 5:28 PM