[rkward-devel] a new approach to external plugins

meik michalke meik.michalke at uni-duesseldorf.de
Tue Aug 30 19:20:01 UTC 2011


hi,

am Samstag 27 August 2011 (12:54) schrieb Thomas Friedrichsmeier:
> > should this go into another package (rkwardplugdev?) or something already
> > present?
> 
> I'm not sure, how far we will go, here. If you are going to add a whole
> bunch  more functions along those lines, then, yes, these should go to a
> dedicated package.

i've cleaned up a lot. i removed all rk.* functions from XiMpLe and put them 
in a package of their own, rkwardplugdev, which depends on XiMpLe. they are 
also all documented now, and some new ones were added:
 rk.XML.cbox()
 rk.XML.row()
 rk.XML.col()
 rk.XML.frame()
 rk.XML.radio()
 rk.XML.vars()

source:
 o http://r.reaktanz.de/src/contrib/rkwardplugdev_0.01-0.tar.gz

docs:
 o http://r.reaktanz.de/pckg/rkwardplugdev/rkwardplugdev.pdf

install:
 install.packages(c("XiMpLe", "rkwardplugdev"), repo="http://R.reaktanz.de")


<example>
test.dropdown <- rk.XML.dropdown("mydrop",
  opts=list("First Option"=c(val="val1"),
  "Second Option"=c(val="val2", chk=TRUE)))

test.checkboxes <- rk.XML.row(rk.XML.col(
  list(test.dropdown,
    rk.XML.cbox(label="foo", val="foo1", chk=TRUE),
    rk.XML.cbox(label="bar", val="bar2"))))

test.vars <- rk.XML.vars("select some vars", "vars go here")

test.tabbook <- rk.XML.tabbook("My Tabbook", tab.labels=c("First Tab",
  "Second Tab"), children=list(test.checkboxes, test.vars))

test.plugin <- rk.XML.plugin("My test", label="Check this out", 
children=test.tabbook)

cat(pasteXMLTree(test.plugin, shine=1, indent.by=" "))
</example>


will result in:


<!DOCTYPE rkplugin>
<document>
 <code file="Mytest.js" />
 <help file="Mytest.rkh" />
 <logic>
  <!-- <convert id="!edit!", mode="!edit!", sources="!edit!", 
standard="!edit!" /> -->
  <!-- <connect client="!edit!", governor="!edit!" /> -->
 </logic>
 <dialog label="Check this out">
  <tabbook id="tbk.MyTabbok" label="My Tabbook">
   <tab label="First Tab" id="tab.FirstTab">
    <row>
     <column>
      <dropdown id="drp.mydrop" label="mydrop">
       <option label="First Option" value="val1" />
       <option label="Second Option" value="val2" checked="true" />
      </dropdown>
      <checkbox id="chk.foo" label="foo" value="foo1" checked="true" />
      <checkbox id="chk.bar" label="bar" value="bar2" />
     </column>
    </row>
   </tab>
   <tab label="Second Tab" id="tab.SecondTb">
    <frame label="select some vars" id="frm.slctsmvr">
     <row>
      <column>
       <varselector id="var.slctsmvr" />
      </column>
      <column>
       <varslot id="vars.slctsmvr" label="vars go here" sources="var.slctsmvr" 
/>
      </column>
     </row>
    </frame>
   </tab>
  </tabbook>
 </dialog>
</document>


let me know what you think :-)


viele grüße :: m.eik

-- 
dipl. psych. meik michalke
institut f"ur experimentelle psychologie
abt. f"ur diagnostik und differentielle psychologie
heinrich-heine-universit"at d-40204 d"usseldorf
-------------- 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/20110830/f2cea474/attachment.sig>


More information about the Rkward-devel mailing list