Hello,
On Jan 22 10:45 Lukas Ocilka wrote:
Dne 22.1.2010 09:48, Martin Vidner napsal(a):
On Thu, Jan 21, 2010 at 12:34:54PM +0100, Johannes Meixner wrote:
I cannot find where `id() is documented, i.e. what exactly
does this symbol do in particular regarding UI functions.
I am confused because
http://forgeftp.novell.com/yast/doc/SL11.1/tdg/id_ycp_data_symbol.html
reads "A symbol is a literal constant".
In contrast
http://forgeftp.novell.com/yast/doc/SL11.1/tdg/ChangeWidget.html
reads "symbol widgetId Can also be specified as `id( any widgetId )"
The ChangeWidget documentation is incomplete. It is true that the ID
can be specified as `foo or `id(bar), where bar is of any type, but
the function prototype wrongly restricts the argument type to
a symbol.
YaST documentation is in SVN and everyone (with write access) can extend
it. Please, do so. Yes, you can :)
The base repository is here (trunk or branches):
http://svn.opensuse.org/svn/yast/trunk/doc/
The rest is generated from code and/or code documentation in respective
module.
By the way:
I like to report now what else in the UI functions documentation
confuses me all the time. For example see
http://forgeftp.novell.com/yast/doc/SL11.1/tdg/PushButton.html
The PushButton "function" prototype (actually it is a term prototype) is
PushButton ( string iconName, string label )
but the examples below "call" (one cannot call a term) it as
`PushButton( `id( `click ), `opt( `default, `hstretch ), "Click me" )
and as
`PushButton( "&OK" )
which all contradict the prototype.
From the examples I guess the prototype might be something like
PushButton ( string label )
PushButton ( term ID, string label )
PushButton ( term options, string label )
PushButton ( term ID, term options, string label )
But now I am again confused because
PushButton ( term ID, string label )
PushButton ( term options, string label )
have the same signature (term, string) so that I wonder
how the heck the UI can distinguish if
`PushButton( `foo, "Click me" )
actually means
`PushButton( `id( `foo ), "Click me" )
or
`PushButton( `opt( `foo ), "Click me" )
Therefore I guess that the symbol value `id or `opt of the term
makes the difference so that the actual prototype is something like
`PushButton ( string )
`PushButton ( symbol, string )
`PushButton ( `id( any ), string )
`PushButton ( `opt( symbol, symbol,... ), string )
`PushButton ( symbol, `opt( symbol, symbol,... ), string )
`PushButton ( `id( any ), `opt( symbol, symbol,... ), string )
But even now it is still left as exercise to the reader
to find out what actually is supported as "any" widget ID ;-)
Kind Regards
Johannes Meixner
--
SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
AG Nuernberg, HRB 16746, GF: Markus Rex
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]