Mailinglist Archive: yast-devel (53 mails)

< Previous Next >
Re: [yast-devel] Type of widget id
On 23.01.2017 09:30, Josef Reidinger wrote:
[widget IDs]
1) CWM expects that id of widget is String, and as ID is used that
string. If not, it will abort with nil id ( as it try to get string
only )

2) call Yast::UI.ReplaceWidget accept only symbol as id of replace
point. Nothing else is accepted.

Back in the days, that ID was defined to be (YCP) type 'any'. The UI never imposed any limitation on the type. libyui has an abstract base type YWidgetID and one specialization YStringWidgetID. The only relevant methods (pure virtual in the base class) are isEqual() and toString() (the latter being important for debugging).

IMHO it should not be that hard to enable at least Ruby symbols in addition to strings, and maybe also numeric types. Compound types like hash, array and any combination of them would be bit over the top IMHO, but we should allow at least those basic types (string, symbol, int).

CWH should be able to use a to_s method if it gets anything else.

Kind regards
Stefan Hundhammer <shundhammer@xxxxxxx>
YaST Developer

SUSE Linux GmbH
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups