[RkWard-devel] plug-in min="" max="", and other things

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Mon Feb 20 18:58:11 UTC 2006


Hi Stefan,

sorry it took a little while longer. My internet connection was down until 
juast a few minutes ago.

> My question is do I have to define the min and the max ? When I don't
> assign values (e.g. min="" instead min="-10000000", This value is
> defined by me and has no real sence.) the spinbox will not work. But I
> don't want to limit these values since for some purposes larger values
> are needed.

Your right. Currently you have to do this, as there is no sensible default for 
min/max (currently 0/100). I expect to change this soon. So, for now, use the 
approach you described, but maybe make a note to yourself to clean this up, 
once it is no longer needed.
BTW, when you want to use the default, instead of specifying a value, just 
omit the attribute altogether (nothing instead of min="").

> And can I simply write Text in a <frame></frame> with some formatting
> (and is formatting (italic, bold, ...) in the interface possible in
> general)?

For text, you need the <text> element. You use it like this:

<text>
This is the message you want to display
Line breaks in the XML are hard breaks in the GUI
Other long lines are wrapped automatically as needed
</text>

Of course you can place the <text></text> inside a <frame></frame>. Currently 
there is no support for formatting, but it would be possible to add this.

> Moreover I need something like a textbox where the user can add a little
> comment for his own documentation which will be later shown in the HTML
> output. At the moment I have just the possibility to enter the date of
> creation. Can I find this in a XML documentation?

In the long run, there will probably be some standardized method for this, and 
thus no need to write it into the plugin. For now, if you want to do this, 
use the <input>-element. Apparently the <input>-element in not documented, 
yet, and I think I'll also change the size-attribute. Anyway, here's a usage 
example:

<input size="small" id="pch" initial="1" label="Enter value - for diff.symbol. 
enter a vector -" />

And no, you would not find this sort of info in an XML documentation, as this 
is all specific to rkward. So, whenever there's something you need to know, 
keep asking.

> Furthermore I'm interested if there is working code snipped for
> charting. Unfortunately is the scatter-plot not working. I guess it will
> be easier with r2html (as described by you some posts before).

I believe I've fixed this in CVS, but anyway, the scatterplot plugin is *very* 
complex, and may not be an easy starting point. The essence is just these 
lines of R code (to be used in function printout):

rk.graph.on ()
plot (table (rpois (100,5)), type="h", col ="red", lwd=10, main="rpois (100, 
lambda=5)")
rk.graph.off ()

Of course the real complicated stuff is the call to plot (), but I'm afraid I 
can't help you much with this, other than pointing you at the R documentation 
for plot ().
Note: If you run the above lines in the R console inside rkward, you will not 
see the output immediately. Use Window->Show Ouput to bring up the output 
window, or Output->Refresh, if the output window is already shown.

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20060220/1b479509/attachment.sig>


More information about the Rkward-devel mailing list