Jan 11 |
3:50 PM |
Mark M. |
has entered the room |
Mark M. |
turned on guest access |
Jan 11 |
4:15 PM |
ndrocchietto_ivano |
has entered the room |
Jan 11 |
4:20 PM |
ndrocchietto_ivano |
Hello Mark, just dropped by to follow some random discussion
|
Mark M. |
hello, Ivano!
|
ndrocchietto_ivano |
waiting for some1
|
Mark M. |
ummm... while it is possible somebody else will show up, it is not that likely
|
ndrocchietto_ivano |
this looks as the principle of indetermination from Heisenberg
|
ndrocchietto_ivano |
everythins is possible, as your JunitTest shows, a particle of light can hit us
|
Mark M. |
Heisenberg is a little intense for me on a Saturday afternoon :-)
|
ndrocchietto_ivano |
so jelous of your US EAstern time, man
|
Mark M. |
I am sure that your time zone has its benefits
|
Jan 11 |
4:25 PM |
ndrocchietto_ivano |
facepalm
|
Jan 11 |
4:45 PM |
ndrocchietto_ivano |
your alterego replied me in another dimension
|
Mark M. |
I wondered if that was you :-)
|
ndrocchietto_ivano |
the question was not really android related
|
Mark M. |
I can handle general Kotlin questions here, given that I have books out on the subject
|
ndrocchietto_ivano |
this sound great to me
|
ndrocchietto_ivano |
sounds*
|
Mark M. |
though kotlinlang Slack is an excellent resource, of course
|
Jan 11 |
4:50 PM |
ndrocchietto_ivano |
absolutely, they are really helpful as well, but with the Europe time, they young kids are out from their home at this time
|
ndrocchietto_ivano |
on Sat night
|
ndrocchietto_ivano |
anyway
|
ndrocchietto_ivano |
I am trying to elaborate the second part of your reply
|
ndrocchietto_ivano |
`If this is your repository, you could change getRecipes() to take your query and a pair of function types, and then you could use lambda expressions for supplying those function types.`
|
ndrocchietto_ivano |
ah I see
|
ndrocchietto_ivano |
Pair<T,D>
|
Mark M. |
fun getRecpies(query: String, onSuccess: (List<Recipe>?) -> Unit, onError: () -> Unit)
|
Mark M. |
then, you would call getRecipes(query, {}) {}, with the inner {} being your onSuccess and the outer {} being your onError
|
ndrocchietto_ivano |
ah
|
Mark M. |
getRecipes(), in turn, would call onSuccess(list) and onError() as appropriate
|
ndrocchietto_ivano |
i tried to use the double {} things because in RXJava I always have these callbacks for free
|
ndrocchietto_ivano |
but did not change the method parameter signature
|
ndrocchietto_ivano |
I am gonna play on that thank you very much
|
Jan 11 |
4:55 PM |
ndrocchietto_ivano |
it works!
|
ndrocchietto_ivano |
thanks
|
Mark M. |
you're welcome!
|
ndrocchietto_ivano |
have a pleasant afternoon
|
Mark M. |
have a pleasant evening!
|
ndrocchietto_ivano |
thumb up
|
Jan 11 |
5:00 PM |
Mark M. |
that's a wrap for today's chat -- the next chat will be Tuesday at 8:30am US Eastern
|
ndrocchietto_ivano |
has left the room |
Mark M. |
turned off guest access |