Hello, On Jan 13 11:02 Lukas Ocilka wrote (shortened):
Johannes Meixner wrote:
I would like to have a higher-level Table function where I could define all what belongs to a table at one same place, e.g. like
Table::SetContentsButtons ( caption, contents, Label::AddButton(), Label::EditButton(), Label::DeleteButton(), );
(looks intentionally like Wizard::SetContentsButtons ;-)
Nice, but that expects there is only one table widget in the dialog. In fact, you need a table identifier.
I didn't want to show the final solution - only the basic idea ;-) Perhaps one could even couple the functionality which does the actual work so that no identifiers are needed like Table::SetContentsButtons ( caption, contents, add_function_name, Label::AddButton(), edit_function_name, Label::EditButton(), delete_function_name, Label::DeleteButton(), whatever_else_function_name, _("Whatever else button label") ); When for example edit functionality does not make sense for a particular Table one could have something like Table::SetContentsButtons ( caption, contents, add_function_name, Label::AddButton(), nil, nil, delete_function_name, Label::DeleteButton(), whatever_else_function_name, _("Whatever else button label") ); I guess the only parameter for the functions which makes sense is the ID of the currently selected item in the Table. Perhaps even better a map of the ID and the actual values of the Table item so that the called function has the values directly accessible. Even for add_function_name the values of the currently selected item make sense (e.g. to have them as preset values in a dialog where a new item can be added). Currently I don't know what to do regarding the return value of the functions (e.g. how to handle errors). Kind Regards Johannes Meixner -- SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany AG Nuernberg, HRB 16746, GF: Markus Rex -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org