Forum: Ruby-core [ruby-trunk - Bug #8957][Open] Ruby tk control variables for radiobutton menu radiobutton and menu c

9aed1f26ed99bd67bd6aeef7d2fc3da7?d=identicon&s=25 rob (rob gow) (Guest)
on 2013-09-26 20:51
(Received via mailing list)
Issue #8957 has been reported by rob (rob gow).

----------------------------------------
Bug #8957: Ruby tk control variables for radiobutton menu radiobutton
and menu checkbutton not working correctly.
https://bugs.ruby-lang.org/issues/8957

Author: rob (rob gow)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0p195 (2013-05-14) [x64-mingw32]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


The control variables for radiobutton menu radiobutton and menu
checkbutton are not working correctly. In a starter project I am coding,
they do not set the variable at all, and if set, it does not affect the
button that is checked. I've tried the defaults, $var @var @@var
Tkvariable.new, and no difference.

I've coded round the radio buttons using the variable and then setting
with .select().
The menu radioButtons I can just do when the command function is called.
With the menu checkButtons, since the variable is not working I cannot
tell the state. So
I set indicatoron to 0 and just flip the action in the command function.
But then there are no
checks for the check boxes.

I've bunched some code together out of the tkdocs tutorial to check
this, and while this at least sets the variable initially, setting the
variable does not change the selected radioButton. But having set the
variable once, clicking the radio buttons no longer changes the
variable. From that point it can only be changed in code. I've uploaded
this as a demo of the problem.

This is on windows
tk is;
irb(main):035:0> Tk::TK_PATCHLEVEL
I've tried ruby 1.9.3p448 as well.

Also Linux ruby  2.0.0p247 versions as well.
=> "8.5.12"
5cf8f058a4c094bb708174fb43e7a387?d=identicon&s=25 nagachika (Tomoyuki Chikanaga) (Guest)
on 2013-09-27 03:52
(Received via mailing list)
Issue #8957 has been updated by nagachika (Tomoyuki Chikanaga).

Category set to lib
Status changed from Open to Assigned
Assignee set to nagai (Hidetoshi Nagai)


----------------------------------------
Bug #8957: Ruby tk control variables for radiobutton menu radiobutton
and menu checkbutton not working correctly.
https://bugs.ruby-lang.org/issues/8957#change-42023

Author: rob (rob gow)
Status: Assigned
Priority: Normal
Assignee: nagai (Hidetoshi Nagai)
Category: lib
Target version:
ruby -v: ruby 2.0.0p195 (2013-05-14) [x64-mingw32]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


The control variables for radiobutton menu radiobutton and menu
checkbutton are not working correctly. In a starter project I am coding,
they do not set the variable at all, and if set, it does not affect the
button that is checked. I've tried the defaults, $var @var @@var
Tkvariable.new, and no difference.

I've coded round the radio buttons using the variable and then setting
with .select().
The menu radioButtons I can just do when the command function is called.
With the menu checkButtons, since the variable is not working I cannot
tell the state. So
I set indicatoron to 0 and just flip the action in the command function.
But then there are no
checks for the check boxes.

I've bunched some code together out of the tkdocs tutorial to check
this, and while this at least sets the variable initially, setting the
variable does not change the selected radioButton. But having set the
variable once, clicking the radio buttons no longer changes the
variable. From that point it can only be changed in code. I've uploaded
this as a demo of the problem.

This is on windows
tk is;
irb(main):035:0> Tk::TK_PATCHLEVEL
I've tried ruby 1.9.3p448 as well.

Also Linux ruby  2.0.0p247 versions as well.
=> "8.5.12"
E4f967492dbd03c526cc9b397e68021d?d=identicon&s=25 nagai (Hidetoshi Nagai) (Guest)
on 2013-09-27 08:07
(Received via mailing list)
Issue #8957 has been updated by nagai (Hidetoshi Nagai).

Status changed from Assigned to Rejected
% Done changed from 0 to 100

It depends on bugs on the reporter's code.

--- test_control_variables.rb  2013-09-27 14:48:40.000000000 +0900
+++ test_control_variables_mod.rb  2013-09-27 14:51:26.000000000 +0900
@@ -49,12 +49,12 @@

 def b_button
     puts("setting contol variable to office")
-    $phone = 'office'
+    $phone.value = 'office'
 end

 def c_button
     puts("setting contol variable to mobile")
-    $phone = 'mobile'
+    $phone.value = 'mobile'
 end

 Tk.mainloop

----------------------------------------
Bug #8957: Ruby tk control variables for radiobutton menu radiobutton
and menu checkbutton not working correctly.
https://bugs.ruby-lang.org/issues/8957#change-42027

Author: rob (rob gow)
Status: Rejected
Priority: Normal
Assignee: nagai (Hidetoshi Nagai)
Category: lib
Target version:
ruby -v: ruby 2.0.0p195 (2013-05-14) [x64-mingw32]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


The control variables for radiobutton menu radiobutton and menu
checkbutton are not working correctly. In a starter project I am coding,
they do not set the variable at all, and if set, it does not affect the
button that is checked. I've tried the defaults, $var @var @@var
Tkvariable.new, and no difference.

I've coded round the radio buttons using the variable and then setting
with .select().
The menu radioButtons I can just do when the command function is called.
With the menu checkButtons, since the variable is not working I cannot
tell the state. So
I set indicatoron to 0 and just flip the action in the command function.
But then there are no
checks for the check boxes.

I've bunched some code together out of the tkdocs tutorial to check
this, and while this at least sets the variable initially, setting the
variable does not change the selected radioButton. But having set the
variable once, clicking the radio buttons no longer changes the
variable. From that point it can only be changed in code. I've uploaded
this as a demo of the problem.

This is on windows
tk is;
irb(main):035:0> Tk::TK_PATCHLEVEL
I've tried ruby 1.9.3p448 as well.

Also Linux ruby  2.0.0p247 versions as well.
=> "8.5.12"
This topic is locked and can not be replied to.