[rkward-devel] New plugin elements <matrix>, <optionset>, <switch>

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Fri Dec 7 18:57:09 UTC 2012


Hi!

There are a few new elements for use in plugins that you may want to read up 
on:

<matrix>: I've already written a short note on that, a while ago: 
 http://www.mail-archive.com/rkward-devel@lists.sourceforge.net/msg01917.html
This allows you to enter a matrix of numbers or strings. Either with fixed 
dimensions, or growing dynamically as the user is typing. Note that this can 
also be used to input vector data (i.e. only one row or column).

<optionset>: You want to provide one or more options for an arbitrary number 
of items? E.g. custom color and line type for each line in a plot, or name and 
min/max version numbers for an arbitrary number of dependencies? Now you can 
do so, using the optionset:
 http://rkward.sourceforge.net/documents/devel/plugins/optionset.html
A first real example of this is given in the Data->Sort plugin (when sorting a 
data.frame). A dialog with further toy examples is in 
under_development.pluginmap (Analysis->Optionset Test).

(I've been planning to add the <optionset> for years, but the details have 
been giving me quite some headaches. So I'm really glad it's finally there.)

<switch>: This is an element for use in the <logic>-section, which allows you 
to switch between two or more properties based on a condition. (E.g. if 
<checkbox> c is unchecked, you want to use a fixed string, if c is checked, 
you want to use a user-supplied string from an <input>-element). The <switch> 
does not offer anything entirely new, as you could implement similar logic 
using <script>s, already. However, sometimes this is simply a more elegant 
alternative.

Read more on the new elements in the "Writing Plugins" document at
 http://rkward.sourceforge.net/documents/devel/plugins/
or inside (the development version of) RKWard by following the link near the 
bottom of Help->Help on RKWard.

Meik: I am aware that new plugin features are just another reason to implement 
run-time checks of plugins' version requirements (R and RKWard). I'll work on 
that (and a better UI for selecting / deselecting .pluginmaps), next.

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/20121207/9936d5a2/attachment.sig>


More information about the Rkward-devel mailing list