Re: [yast-devel] How to preselect a table entry?
Hi Again, Lukas kindly reminded me that this is an english mailing list, sorry for forgetting that. Here my reply again in english:
how can I have a particular table entry preselected like an entry in a SelectionBox?
Basically with the following: string tag = (string)UI::QueryWidget(`id(`table), `CurrentItem); UI::ChangeWidget(`id(`table), `CurrentItem, tag ); AFAIK nothing gets preselected, if one uses a value with ChangeWidget that does not exist in the table. Tschuess, Thomas Fehr -- Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Markus Rex, HRB 16746 (AG Nürnberg) Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr@suse.de GPG public key available. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Qui, 2007-11-22 às 17:57 +0100, Thomas Fehr escreveu:
AFAIK nothing gets preselected, if one uses a value with ChangeWidget that does not exist in the table.
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) With regard to unselecting a row, its interesting that libyui will return `nil on no selection, but won't accept that value for the CurrentItem property. This seems incoherent, and, if addressed, would let Johannes do what he wants. Cheers, Ricardo -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Thu, Nov 22, 2007 at 05:21:44PM +0000, Ricardo Cruz wrote:
With regard to unselecting a row, its interesting that libyui will return `nil on no selection, but won't accept that value for the CurrentItem property. This seems incoherent, and, if addressed, would let Johannes do what he wants.
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. -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Sex, 2007-11-23 às 09:12 +0100, Martin Vidner escreveu:
On Thu, Nov 22, 2007 at 05:21:44PM +0000, Ricardo Cruz wrote:
With regard to unselecting a row, its interesting that libyui will return `nil on no selection, but won't accept that value for the CurrentItem property. This seems incoherent, and, if addressed, would let Johannes do what he wants.
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.
I dunno, I just had a peak at the code, I don't know YCP much. Updated to SVN, and its definitively different. Didn't bother locating this new YPropertyValue aider, but I'll trust you. ;) Cheers, Ricardo -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (3)
-
Martin Vidner
-
Ricardo Cruz
-
Thomas Fehr