askYesNo()
meik michalke
meik.michalke at uni-duesseldorf.de
Tue May 8 13:33:19 UTC 2018
hi,
Am Dienstag, 8. Mai 2018, 11:00:44 CEST schrieb Thomas Friedrichsmeier:
> > so, to fully implement askYesNo() without breaking backwards
> > compatibility, we could add a new argument to rk.show.question():
> > default=TRUE
> >
> > and when called by askYesNo():
> > default=default
>
> Ok, added.
+1
> > the error if response is NULL emulates what happens when a wrong
> > value is entered. askYesNo() raises an error, but if you simply close
> > the rk.show.question() dialog it returns NULL.
>
> I do not think this is needed. The error is for an "invalid" response,
> as far as I understand (such as answering "I don't know"), while
> Cancel is an expected condition, and may be perfectly normal.
i misunderstood rk.show.question()'s return values, so NULL is what it returns
for cancel and closing the window is treated the same way.
however, i would still argue that users of askYesNo() do not anticipate it
returning NULL, because TRUE, FALSE and NA is all that's documented. if we
introduce another return value that is not expected, it could lead to
behaviour that's hard to debug in user's scripts and packages. so i'd suggest
we check for the NULL return value and translate it into NA here, not an
error. but we should not return NULL.
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: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20180508/c05fd8ea/attachment.sig>
More information about the rkward-devel
mailing list