On Wed, 10 Jun 2020 12:21:06 -0600
"David Benjamin"
Hello everyone,
I have data from a file that was parsed using CFA::AugeasParsser.
Can it be used in a dialog without translating from CFA::AugeasTree it to Yast::Term.Tree?
Hi David, sadly(?) it cannot be done. Usual work-flow is to have own model class that is child of CFA::BaseModel that provide access to variables you are interested ( as usually you do not want to present user everything in file to not overwhelm him ). This model is then used as backend and in frontend you use various terms to represent widgets. As beside parsing, config file values often have its semantic and you want to help user to fill it correct. So e.g. for variables that are on/off you want to use checkbox, if it is local path, you want input field with Browse button that allows to select file on system, or int field for integer values. Also often configuration files has dependent values, like if value A is true, then value A1 is used, but if it is false, it is ignored. You can represent it in frontend by event handling that disable widget for A1 if A is unselected. If you are interested in example code, just write and I can point you to some. ( also nowadays we use quite lot CWM widgets, which is object oriented way how to write widgets, so if you are interested, I can also point you to some examples and code ).
Thanks, David.
Josef -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org