I could really use some help with macOS UI work for this Mastodon client I'm working on. I'm struggling ridiculously with the core concept of NSTableView cell resizing.
Please boost.
I could really use some help with macOS UI work for this Mastodon client I'm working on. I'm struggling ridiculously with the core concept of NSTableView cell resizing.
Please boost.
@charlag don't buy into that lie. Kotlin nullable types are real in Kotlin, as much as Swift nullable types are real in Swift.
Objective C can break those constraints just as well as Java can in Kotlin.
@charlag I thought that might be what you are saying, but I can't think of the use case.
If you really need that you can just do this:
fun String.optional(): String? {
return this
}
@piecritic there was one case when I wanted to use Rx like that
someNetworkRequest()
.map { Optional(t) }
.onErrorJustReturn(nil)
.filter { it != nil }
but I had to go with something like
.onErrorResumeNext(Observable.empty())
@charlag right, so I use OpenAPI for literally everything now, and I have a Kotlin output.
You might want to play with it.
tl;dr you define a REST API in a YAML file, run it through a script, and get a Retrofit/OkHttp typesafe API + models out of it. xD
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
... and I haven't published the generator to github yet and only just realised omg.