hi,

i just added two new JS functions to trunk:

 - shortName()
   JS equivalent to rk.get.short.name(), i.e. turn
   my.data.frame[["var1"]] and my.list[["var1"]][["var2"]]
   into var1 and var2

 - getValueShort()
   a getValue() alternative for varslots, to get an array of
   short names directly

examples:

function calculate(){
  // read in variables from dialog
  // long way:
  var myVarslot1 = getValue("my_varslot");
  myVarslot1 = shortName(myVarslot1);
  myVarslot1 = myVarslot1.join(", ");
  echo("c(" + myVarslot1 + ")");

  // shortcut:
  var myVarslot2 = getValueShort("my_varslot").join(", ");
  echo("c(" + myVarslot2 + ")");
}

what do you think?

i put them to rkward/scriptbackends/common.js -- is that a good place? i could 
probably come up with some more functions to ease the JS coding part for 
rather common stuff. 


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  abt. f"ur diagnostik und differentielle psychologie
  institut f"ur experimentelle psychologie
  heinrich-heine-universit"at d"usseldorf

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel

Reply via email to