diff options
author | Mathieu Duponchelle <mduponchelle1@gmail.com> | 2020-08-08 14:48:14 +0000 |
---|---|---|
committer | Mathieu Duponchelle <mduponchelle1@gmail.com> | 2020-08-08 14:48:14 +0000 |
commit | 9e329e9b7bc2f29d4265af87abfc41db1348f24c (patch) | |
tree | be31098a2ade2addfe4d5460bcd47a10dc706eeb | |
parent | a567106da815d580e0e0b2d7bb148108ea918032 (diff) | |
parent | 30a7b2076f1a803b3424151503c7005262d532f2 (diff) | |
download | gobject-introspection-9e329e9b7bc2f29d4265af87abfc41db1348f24c.tar.gz |
Merge branch 'property-method-name-conflict' into 'master'
website: Add section about property/method name conflicts
See merge request GNOME/gobject-introspection!232
-rw-r--r-- | docs/website/writingbindableapis.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/website/writingbindableapis.rst b/docs/website/writingbindableapis.rst index 9ab11b47..70d3bbc7 100644 --- a/docs/website/writingbindableapis.rst +++ b/docs/website/writingbindableapis.rst @@ -141,6 +141,15 @@ Error domain quarks should always be named in the form GQuark foo_bar_errors_quark(); +Don't have properties and methods with the same name +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some bindings for dynamic languages expose GObject properties and methods in the +same way, as properties on an object instance. So don't make a GObject property +with the same name as a method, e.g. a property named ``add-feature`` on a class +named ``SoupSession`` which also has a method ``soup_session_add_feature()``. + + Custom code in constructors ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |