[rkward-devel] Dependencies and 'about' information for plugins

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Sun Feb 17 09:57:38 UTC 2013


Hi!

On Saturday 16 February 2013, meik michalke wrote:
> ok, i think i have most of the new stuff more or less implemented in
> rkwarddev now.

Great!

> could you play around with these new funtions:

I'm having lots of real-life distraction ATM, so my feedback will be coming in 
a piecemeal fashion:

>   - rk.XML.switch()

Generated code looks correct to me. However,
a) An example for using case and default would be really helpful.
b) Perhaps the function signature could be simplified to

rk.XML.switch(condition, modifier = NULL, cases, id.name = "auto")

# if there are exactly two cases, and their standards are logical(!) 
TRUE/FALSE, generate a true/false switch
rk.XML.switch ("foo", cases = list (
    list (standard=TRUE, fixed_value="foo"),
    list (standard=FALSE, fixed_value="bar")
))

# otherwise a "case" switch. If the final case specification has no standard 
(or standard=NULL), make it a <default>.
rk.XML.switch ("foo", cases = list (
    list (standard="square", fixed_value="foo"),
    list (standard="circle", fixed_value="bar"),
    list (fixed_value="other")
))

(If it wasn't for the optional "modifier" argument, cases could even be passed 
through a "..." argument, which would remove the need for a nested list).

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20130217/fa658cfa/attachment.sig>


More information about the Rkward-devel mailing list