GNOME Bugzilla – Bug 725833
Radiobutton Sample does not works as expected
Last modified: 2014-03-06 15:43:34 UTC
The example can be accessed here: https://developer.gnome.org/gnome-devel-demos/stable/03_getting_the_signal.js.html.en#radiobuttonsample At line 46 we have: this._cookieButton = new Gtk.RadioButton ({ label: "Cookie" }); But at line 62 we have: this._cookieButton = new Gtk.Button ({ So, we get this error when clicking the button at app (gjs appfile.js): (gjs:31570): Gjs-WARNING **: JS ERROR: TypeError: this._cookieButton.get_active is not a function GettingTheSignal<._getACookie@a.js:96 wrapper@/usr/share/gjs-1.0/lang.js:213 @a.js:110 A fast fix here is simple change the Gtk.Button name, for example: Line 62: this._getCookieButton = new Gtk.Button ({ Line 66: this._getCookieButton.connect ('clicked', Lang.bind (this, this._getACookie)); Line 80: this._grid.attach (this._getCookieButton, 0, 1, 1, 1); The page text should be revised too. Sorry about don't send a diff fix, I have not checked if there are the page source code in some place. But I'm creating this bug fix just to remember what we talked at #gnome-hackers channel.
Thanks, i fixed this in master as commits 948e5441f8ccb7c3d203690fac504794889b53fb and 7d29ed713f454b11f275d93485aff86c174cd173.