hi there,

Am Samstag, 11. Oktober 2014, 17:50:57 schrieb Thomas Friedrichsmeier:
> On Saturday 11 October 2014 17:44:33 Thomas Friedrichsmeier wrote:
> > Thus, perhaps, naming an id manually, is the way to go.
> > I.e rk.XML.radio() could accept options like this:
> ok, I was too slow...

sorry ;-) in rkwarddev you're used to feeding your XML objects to other 
functions to get their ID, so you will expect this to be possible here as 
well. the problem is that using the radio-node that way leaves the problem of 
identifying one of the options. so i thought the clearest way of doing it 
would be to make the option an object of its own.

> Well, perhaps if you can make it so that rk.XML.radio() can accept a mixed
> list like this?
>   list ("First option"=c (val="1"), "Second option"=c (val="2", chk=TRUE),
>         rk.XML.option ("Optional option", val="3", id.name="three"))

that exactly is the plan. for re-use of the ID later on (e.g., in the logic 
section), you should also store it in an object:

  list (
    "First option"=c (val="1"),
    "Second option"=c (val="2", chk=TRUE),
    option3 <- rk.XML.option ("Optional option", val="3", id.name="three")

the last remaining problem here is that you cannot access the node by its ID 
alone, you still need the radio node ID as well (rID.oID). i'm not sure yet 
how to solve this elegantly (it's similar to identification in optionsets). 
[maybe using an environment like for the help text is an idea here... as long 
as IDs are unique, finding the parent ID of an option ID shouldn't be so hard]

i also want to write a check for the chk argument, so only one option can have 
it set to TRUE.

i've also seen that i repeatedly wrote several lines of code to check for the 
kind of node which is nested in other nodes, that calls for a dedicated 
function and a central list of valid child nodes as well.

> The point would be to make sure that options that don't need an id don't get
> one, automatically.

yes, and in contrast to other functions, where the default is id.name="auto", 
in rk.XML.option() the default is already set to id.name=NULL: even if you 
want an auto-ID, you have to manually call for it.

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

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

Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
RKWard-devel mailing list

Reply via email to