stanislav.erokhin
abu
03/19/2016, 3:52 PMabu
03/19/2016, 5:30 PMFunction1<A, B>
== (A) -> B
. Are there any shorthands for Pair<A,B>
?abu
03/19/2016, 5:32 PMinterface Function<A>
in a "pretty" notation?Andreas Sinz
03/20/2016, 9:58 PMto
function like 1 to "a"
, see https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/to.htmlmellson
03/21/2016, 8:18 AMvoddan
03/21/2016, 8:38 AMabu
03/21/2016, 8:50 AMfun myfunc(..): Pair<A,B> = ...
in a prettier way?abu
03/21/2016, 8:50 AMfun myfunc(..): (A,B) = ...
?stanislav.erokhin
mellson
03/21/2016, 9:46 AMegslava
03/21/2016, 12:58 PMvar asset: Asset = Asset() // UNDEFINED BEHAVIOR!!! see #onViewCreated!
get() = field
set(value) {
...
}
And I initialise it after fragment is created:
asset = cache.assets.best()!! // Choosing the best asset! Don't remove this string
I do it this way cause I want have asset
parameter of fragment. When it’s changed - UI is also changed. Also you can get current asset
if you want.egslava
03/21/2016, 12:59 PMegslava
03/21/2016, 1:00 PMegslava
03/21/2016, 1:01 PMoverride fun onNetMessage(action: String?, message: Any?)
. When system receives network packages - that function will be called.egslava
03/21/2016, 1:01 PMasset
- I need to use class-scope for this variable.artem_zin
03/21/2016, 1:25 PMvoddan
03/21/2016, 1:26 PMvoddan
03/21/2016, 1:27 PMvoddan
03/21/2016, 1:27 PMbazted
03/21/2016, 1:33 PMegslava
03/21/2016, 3:10 PMegslava
03/21/2016, 3:11 PMvoddan
03/21/2016, 3:22 PMvoddan
03/21/2016, 3:23 PMvoddan
03/21/2016, 3:23 PMmellson
03/21/2016, 3:24 PMegslava
03/21/2016, 3:25 PMvoddan
03/21/2016, 3:26 PMprivate var _asset: Asset? = null
var asset: Asset
get() = _asset ?: throw Exception()
...
egslava
03/21/2016, 3:28 PM