[Kommander-devel] Flaw in new parser?

Eric Laffoon eric at kdewebdev.org
Wed Jul 13 14:10:47 EDT 2005


Michal,
maybe you can give me some input here? I was working with a dialog using the 
new parser and I wanted to create a conditional structure based on the state 
of radio buttons. Because the group can have a checkbox we can't check it's 
value, though it seems still desirable to work around. The next logical thing 
is something like...
if (radio1.text == true)
  //do something
endif
The problem here is that the text attribution returns something like "Do 
&Something". Not only does this suck for managing it... it doesn't reflect 
state. We can set, but I see no way to check for set or unset, at least in a 
quick look. I could be making a fool of myself. ;-)

The original idea though with Kommander was that I could put the commands in 
the checked state and call each button...
radio1
radio2
radio3
However this doesn't seem to work. Ideally I want to have them include the 
text, similar to an execute. I was concerned if "null" would work in the 
unchecked state. I never got that far. I get an error there is a missing '.' 
and the only apparent option is ".text". As you can guess this does not work.

Unless I'm missing something it looks like using radio buttons might be rather 
difficult with the new parser.

Several possible solutions present themselves, and I really wish we had done 
this before 3.4.
1) Add a "set" or "state" attribute to check if a radiobutton is checked.
2) Add an "include" attribute for widgets to simply add their content in line. 
This would be particularly useful for radiobuttons.
3) consider a "radioinclude" and/or "radioselection" for buttongroups.

Feedback?
-- 
Eric Laffoon
Project Lead - kdewebdev module


More information about the Kommander-devel mailing list