On Friday 06 November 2009 12:54:47 Johannes Meixner wrote:
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.
Usually CWM widget functions look like this: init : InitMyCoolDialog handle: HandleMyCoolDialog store: StoreMyCoolDialog 'handle' describes immediate responses to user actions, for example something happens once user (de)selects a check box, or pushes a button 'store' is called as soon as the dialog is left - e.g. when user clicks on Next/OK button, or switches to different tab or tree branch To the above, you may want to add those: validate_type : `function, validate_function: ValidateMyCoolDialog where ValidateMyCoolDialog will be a function returning boolean - true if the validation passes, false otherwise. 'validate' is called prior to 'store' (described above) and only if it returns true, data are really stored. Otherwise, when the validation does not pass, the control is returned to the dialog and user is not allowed to leave it unless the errors are corrected. hB. -- \\\\\ Katarina Machalkova \\\\\\\__o YaST developer __\\\\\\\'/_ & hedgehog painter -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org