Comonicon.jl icon indicating copy to clipboard operation
Comonicon.jl copied to clipboard

Make a simple GUI

Open Eggiverse opened this issue 5 years ago • 7 comments

In many cases, especially on Windows, a GUI might be helpful to promote the usage of a package.

The GUI could be just a form that maps all arguments to controls and a START button.

I hope it supports different GUI backends like imGUI, Blink etc.

Probably it is better to implement this in another package rather than modifying Comonicon so that Comonicon focuses on CLI only.

Eggiverse avatar Aug 24 '20 05:08 Eggiverse

I think it would be of significant help if an abstract type for codegen is defined. It makes it easier to keep interface compatible.

Something like

abstract type AbstractCtx end

function codegen(::AbstractCtx, cmd) end

mutable struct ASTCtx <: AbstractCtx
    ......
end

Eggiverse avatar Aug 24 '20 17:08 Eggiverse

there is no fallback methods for contexts, why abstract type is necessary here?

Roger-luo avatar Aug 24 '20 19:08 Roger-luo

I thought I found some methods for ASTCtx can be used for my package.

It is not going as smoothly as I expected.

Eggiverse avatar Aug 26 '20 11:08 Eggiverse

can you point out which method? I can't get any information from your description.

Roger-luo avatar Aug 26 '20 18:08 Roger-luo

My package ComoniconGUI now works (at least for examples).

I haven't dealt with recompilation for now. It depends on Comonicon with default value support in #58 .

Eggiverse avatar Sep 04 '20 17:09 Eggiverse

why do you need to rewrite @cast in ComoniconGUI instead of change it here?

Roger-luo avatar Sep 04 '20 19:09 Roger-luo

I want to understand which functions need to be modified in Comonicon and which need to be simply rewritten in ComoniconGUI.

All functions in ComoniconGUI.Parse are in the list.

For now, ComoniconGUI makes sure it works without modifying Comonicon until it is found to be necessary.

Eggiverse avatar Sep 05 '20 02:09 Eggiverse