After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725833 - Radiobutton Sample does not works as expected
Radiobutton Sample does not works as expected
Status: RESOLVED FIXED
Product: gnome-devel-docs
Classification: Applications
Component: platform-demos
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-devel-docs maintainers
gnome-devel-docs maintainers
Depends on:
Blocks:
 
 
Reported: 2014-03-06 15:40 UTC by Saulo Toledo
Modified: 2014-03-06 15:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Saulo Toledo 2014-03-06 15:40:02 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.
Comment 1 David King 2014-03-06 15:43:34 UTC
Thanks, i fixed this in master as commits 948e5441f8ccb7c3d203690fac504794889b53fb and 7d29ed713f454b11f275d93485aff86c174cd173.