Mailinglist Archive: yast-devel (66 mails)

< Previous Next >
Re: [yast-devel] YaST in ruby and UI terms
* Josef Reidinger <jreidinger@xxxxxxx> [Jun 25. 2013 11:35]:
I would like to discuss one think that is related to creating UI in
YaST in ruby. In YCP it uses terms. In ruby generic terms looks like:


but it is not much nice for me, so I create few shortcuts for known UI
elements and it looks like this:


Agreed, the latter one looks so much nicer.

There is a problem. In UI is often used terms `id and `opts, but it
doesn't start with uppercase and there is high chance to collide with
existing methods ( beside id collide with ruby id method ).

Usage of object#id is not a problem if 'id' is defined in object's

So I
propose to translate it to
ID(:id) and OPTS(:strechable,:notify)

Ugh, all caps is reserved for constants in Ruby.

alternative can be Opts and Id.
what is your opinion?

libyui-bindings has more complete examples
which could help guiding a decision.

SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB
16746 (AG Nürnberg)
Maxfeldstraße 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