python - gtk.gdk.color_parse() equivalent in vala -
i'm trying find equivalent pygtk function gtk.gdk.color_parse
in vala. can find gdk.color.parse
sort of similar, returns boolean instead of gdk.color structure. seems should able find equivalent python function, don't seem able to.
no, that's 1 - gives color "out parameter" instead of return value. python doesn't have out parameters (well, python has feature if try hard enough...) boolean return value tells whether parsing succeeded. pygtk raises exception if doesn't.
use this:
gdk.color fuchsia; if (!gdk.color.parse("fuchsia", out fuchsia)) print("there error parsing, must have spelled fuchsia wrong");
Comments
Post a Comment