[RkWard-devel] need a little help..
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Fri Mar 23 12:16:36 UTC 2007
Hi,
On Friday 23 March 2007 05:12, Prasenjit Kapat wrote:
> I have done the modularisation for all the CLT plugins. It should be easier
> to manage them now.
Indeed. Unfortunately, I can't come up with anything to change everywhere,
right now ;-). Seriously, I've had a close look at some of them, and a glance
at all each one of the PHP files, and I just can't find anything to complain
about.
I'll take another look on Sunday, and if I don't find anything then, either
(or somebody else finds somthing until then), I'll move them to the
distributions .pluginmap, making them "official", then.
> > Right. If you have any ideas, how this could look like in the .xml, I'll
> > think about how those could be implemented (assuming there really is no
> > good way to do this with the current concepts).
>
> Well, are there any <include file=".."/> options in xml?
Yes, I've been thinking along those lines, too. One problem is, that you'd
typically want to include a whole number of "blocks", in this case:
1) some <logic>
2) the "CLT Samples" frame
3) the right column
4) preview and plot-options
5) the hist and ECDF-tabs
The problem isn't that those 5 blocks are anything complex, but in order to
place the distribution parameters frame directly in the center, where it fits
nicely, I think all the rest would need to be split up into this many parts.
If we ever were to offer a wizard interface to these plugins, the problem
would multiplicate.
One idea I have right now is to use your <include file="..."/>, but this file
would define different "snippets" that can be placed at different places:
<include file="common_elements.xml" id="common_elements"/>
<logic>
...
<insert snippet="common_elements.logic"/>
</logic>
<dialog>
<tabbook>
<tab label="Parameters" >
<row>
<column>
<insert snippet="common_elements.samples"/>
</column>
...
This would reduce the number of files needed, and at least keep all the common
elements in one file.
On the other hand, in this case, perhaps we'd really want to do it the other
way around: Have one common "template"-XML file, and this file will simply
include the frame of distribution parameters at the right place. Difficulty
is how to "know" in the code, which distribution parameters need to be
included.
Perhaps we can mimick what we just did for the PHP files: E.g. the
plot_weibull_clt.xml would look like this:
<document>
<snippets>
<snippet id="logic">
<set id="plotoptions.default_main" to="Weibull"/>
<snippet>
<snippet id="parameters">
<frame id="frame_weibullparam" label="Weibull Parameters">
<spinbox default_precision="1" type="real" id="shape" initial="2" min
="0.01" label="Shape" />
<spinbox default_precision="1" type="real" id="scale" initial="1" min
="0.01" label="Scale" />
</frame>
<snippet>
<snippet id="note"><!-- empty --></snippet>
</snippets>
<include file="plot_clt_template.xml"/>
</document>
plot_clt_template.xml would define all the common stuff, and, insert the
defined snippets at the right places. Now how to set the dialog caption,
correctly? No good idea on that, yet. But I think we may be on to something.
Also referencing this mail in the TODO file, so I can easily look it up again,
later.
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/20070323/369536d7/attachment.sig>
More information about the Rkward-devel
mailing list