[Webkit-unassigned] [Bug 16401] [GTK] GObject/C DOM binding

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 11 02:21:09 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=16401





------- Comment #131 from xan.lopez at gmail.com  2009-02-11 02:21 PDT -------
(In reply to comment #128)
> Created an attachment (id=27549)
 --> (https://bugs.webkit.org/attachment.cgi?id=27549&action=view) [review]
> - In the last patch, each DOM attribute was exposed as a GObject property, but
> not via GObject getter/setter methods. In GTK it's actually common to expose
> properties in both ways; for example, GTKWidget has both a "name" property and
> methods gtk_widget_get_name() and gtk_widget_set_name(). �We feel that GObject
> properties alone are inadequate for exposing DOM attributes, both because they
> are relatively inefficient (they are accessed via a string name provided at
> runtime) and also because there's no way to report error information when a
> caller gets or sets a property.

BTW, one way of dealing with this would be to add a property to the base class
of the DOM objects that would hold the error, so you could do something like
g_object_get (object, "dom-property", &dom, "dom-error", &error, NULL); I guess
you'd define it so that it only holds the first error reported, to match the
semantics of exceptions (meaning that if you try to access several properties
at the same time you'll only get the first error in case there's several..). Of
course setter/getter functions are easier because you can only access one
property at a time :)


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list