dynamically set options for a dropdown menu
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Thu Oct 11 12:06:55 BST 2018
Hi!
On Thu, 11 Oct 2018 11:39:02 +0200
meik michalke <meik.michalke at uni-duesseldorf.de> wrote:
> Am Donnerstag, 11. Oktober 2018, 07:17:11 CEST schrieb Thomas
> Friedrichsmeier:
> > On Wed, 10 Oct 2018 21:46:26 +0200
> > meik michalke <meik.michalke at uni-duesseldorf.de> wrote:
> > > so, could the above call somehow be used to dynamically
> > > fill a dropdown menu in a plugin dialog?
> >
> > this is not currently possible for a dropdown, but you can set the
> > options of a <select> element, dynamically (property "available").
> >
> > Of course that feature would make sense for a dropdown just as much,
> > but the implementation of that is quite different.
>
> i see. but select can't be limited to single selections, right?
True, but this will be easy to add. Hang on...
> as you've seen, i've added a small function called
> rk.check_for_pandoc() to the rkward R package, which checks the
> system for a pandoc installation and provides some information on
> supported formats.
>
> i think it should either added somewhere to RKWard's startup routine
> and its findings appended to the global .Options, and/or included in
> rk.sessionInfo() (for debugging).
>
> can plugins access the global .Options? if not, at the very least a
> sanity check can now be added to the R code to be run, so if the user
> tries to submit something that is not supported by his/her system
> setup, a proper error message is returned.
See plugins/data/level_select.xml for an example of how to query R for
information from inside a plugin dialog (also somewhere in the docs, of
course, but going by example will be easiest).
Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20181011/f8d1f815/attachment.sig>
More information about the rkward-devel
mailing list