Mailinglist Archive: yast-devel (126 mails)

< Previous Next >
Re: [yast-devel] How to stay in a tab in DialogTree after clicking Next
  • From: Jiri Srain <jsrain@xxxxxxx>
  • Date: Fri, 6 Nov 2009 13:07:12 +0100
  • Message-id: <200911061307.13317.jsrain@xxxxxxx>
Dne pátek 06 Listopad 2009 12:54:47 Johannes Meixner napsal(a):
Hello,

On Nov 6 12:15 Jiri Srain wrote (shortened):
I think you should use "validate" instead of "handle" for deciding
whether to leave the dialog or not. In case of "handle", the return value
means to leave the dialog with specified ret val, however, nil does not
prevent leaving the dialog. Failing validation does.

Regarding DialogTree I know currently only about the information at
http://forgeftp.novell.com/yast/doc/SL11.1/modules/DialogTree.html
which does not help to understand what "validate" instead of "handle"
means.

Refer to documentation in svn: /yast2/library/cwm/doc (it is a docbook, you
can read advanced.xml), or find some examples in the sources, there are a lot
(grep for '"validate_type"').

The code in yast2-printer in src/dialogs.ycp was initially
written by Michal Zugec and I do not understand very much
about what there goes on internally.

If I used "validate", it would have to leave the dialog when
everything is o.k. but not leave it only when there is an error.
Is this possible?

That's exactly what validation does. If it fails, it does not allow to leave
the dialog. If you use validation via function, you can also define other
actios to do (display specified message, change active widget, etc).

Jiri


--
Regards,

Jiri Srain
YaST Team Leader
---------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: jsrain@xxxxxxx
Lihovarska 1060/12 tel: +420 284 028 959
190 00 Praha 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >