clikt icon indicating copy to clipboard operation
clikt copied to clipboard

Replacement for `editText` and `editFile`

Open cmdjulian opened this issue 1 year ago • 4 comments

Hey, since version 5.0.0 the two methods editText and editFile have been removed as part of the removal of TermUi. As my app depends on it, I was wondering if there is an replacement for those two functions. There were also not marked as @Deprecated as one would expect. The documentation seems to still refer to the old TermUi object. There seems to be no proxy methods added within CliktCommand like the following comment suggests https://github.com/ajalt/clikt/pull/344#issuecomment-1108040492

Thanks in advance.

cmdjulian avatar Sep 16 '24 11:09 cmdjulian

Thanks for the heads up on the docs, they should be fixed now.

The TermUi editor functions were the only usages of expect/actual, so removing them means all that's left is commonMain, so it's easier to publish on every target. I could add similar functionality to mordant, which already has a lot of platform-specific implementations.

ajalt avatar Sep 17 '24 01:09 ajalt

That would be really good, as it effectively let's the user a little bit in the rain here without proper replacement like in my case :( This is a rather handy utility function!

cmdjulian avatar Sep 17 '24 07:09 cmdjulian

You can also always copy the old implementation if you want to use it now.

ajalt avatar Sep 17 '24 16:09 ajalt

I did that, but it's a bit clumsy. Any progress so far?

cmdjulian avatar Dec 05 '24 14:12 cmdjulian