Closed JumpLink closed 11 years ago
label = new gtk.Label({label:"test"}); is correct. GObject constructor accepts property name, value pairs, so there are not strict arguments.
And what about:
var box = new gtk.Box( { orientation : gtk.Orientation.vertical } );
in this case it does not work. Although it works as follows:
box.orientation = gtk.Orientation.vertical;
"orientation" is a property they comes from the gtk.Orientable interface.
I am not sure if I understand the problem. Is constructor argument ignored in every case, or just in the Box constructor one? Might be that gtk.Orientation.vertical is of type which is not supported in constructor (yet). Also might be related to fact that 'orientation' property is registered for GtkOrientable interface.
"Might be that gtk.Orientation.vertical is of type which is not supported in constructor (yet)." This is what I meen, thank you.
For example
or
are not working, the box has no vertical orientation or an error.
But this works:
Similar in
This label has not the given text "test" inside it.
But this works:
or this works,too: