Created
May 14, 2014 02:39
-
-
Save mattdangerw/a7981a88e5e572016730 to your computer and use it in GitHub Desktop.
gjs property bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Lang = imports.lang; | |
const GObject = imports.gi.GObject; | |
const Gtk = imports.gi.Gtk; | |
const TestObject = new Lang.Class({ | |
Name: 'TestObject', | |
Extends: GObject.Object, | |
Properties: { | |
'prop': GObject.ParamSpec.string('prop', '', '', GObject.ParamFlags.WRITABLE, '') | |
}, | |
_init: function (props) { | |
this.parent(props); | |
}, | |
set prop (v) { | |
print("here"); | |
v = v.notathing.whyisthishappening; | |
throw new Error(); | |
} | |
}); | |
let test = new TestObject({ | |
prop: "t" | |
}); | |
// This code only matters because it calls bind property | |
Gtk.init(null); | |
let label = new Gtk.Label(); | |
label.bind_property('label', | |
label, 'name', | |
GObject.BindingFlags.SYNC_CREATE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment