Mailinglist Archive: yast-devel (129 mails)

< Previous Next >
Re: [yast-devel] How to preselect a table entry?
  • From: Johannes Meixner <jsmeix@xxxxxxx>
  • Date: Fri, 23 Nov 2007 10:39:15 +0100 (CET)
  • Message-id: <Pine.LNX.4.64.0711231018240.21212@xxxxxxxxxxxxxx>

Hello,

On Nov 22 17:56 Lukas Ocilka wrote (shortened):
Johannes Meixner napsal(a):
http://forgeftp.novell.com/yast/doc/SL10.3/tdg/Table_widget.html
I have read this but obviously I didn't understand it ;-)
In that case, you can fix or extend the documentation.

What kind of documentation quality do you expect to get from me
when even the experts seem to be at odds what the right way is?

See:

"AFAIK nothing gets preselected, if one uses a value with ChangeWidget
that does not exist in the table."

versus

"That's not right. It is not documented, but -qt and -ncurses do it.
There is YCP code that actually gets broken if you change that behavior.
(e.g.: https://bugzilla.novell.com/show_bug.cgi?id=327492)"

versus

"Sorry, that is a regression that I introduced in 10.3. It is fixed
since yast2-core-2.16.3. (#340523)
And BTW, nil is not `nil, and yes, it caused a bug too, #339749."

versus

"In new mod-ui, YTable inherits from YSelectionWidget deselectAllItems()
method, which does exactly what you want. So obviously there is a way how to
do it, but I have no clue how to call it from YCP code :("


By the way:

During my trial-and-error approach I found out that it seems
the content of a Table is cut when one single item has wrong
number of elements:
I tried to add a "true" to one entry like in SelectionBox
to make this one preselected.
But in this case there is in y2log:
----------------------------------------------------------------------
... [ui] YTable.cc(addItem):204 Invalid item specification
`item (`id (6), "HP deskjet 3320",
"hp:/usb/deskjet_3320?serial=TH27T2H35B35",
"HP deskjet 3320 USB TH27T2H35B35 HPLIP", true):
Wrong number of elements
----------------------------------------------------------------------
Perhaps it would be better when YTable.cc(addItem) could gracefully
skip an invalid item and proceed with the next one?
Or perhaps discard all items so that the error is obvious
but not just cut the table at the item where it happens.


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@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups