Methods for things that can be accessed through properties

Hi!

What do we do with methods for things that can be accessed through
properties?

As an example, GMountOperation has g_mount_operation_get_anonymous.
Should this be implemented as GLib::MountOperation#anonymous?, or is
it enough that introspection adds anonymous? for the specified
property?

I see no real reason for implementing these property-getting/-setting
methods manually, but I might be missing something.

http://library.gnome.org/devel/gio/stable/GMountOperation.html#g-mount-operation-get-anonymous

Hi,

In [email protected]
“[ruby-gnome2-devel-en] Methods for things that can be accessed
through properties” on Wed, 10 Nov 2010 13:45:06 +0100,
Nikolai W. [email protected] wrote:

What do we do with methods for things that can be accessed through properties?

I think that accessors for properties are generated
automatically. And boolean properties will also get XXX?
accessors.

P.S. Nikolai, did you see the bug?
http://sourceforge.net/tracker/?func=detail&aid=3104368&group_id=53614&atid=470969

Thanks,

kou

On Wed, Nov 10, 2010 at 14:45, Kouhei S. [email protected] wrote:

In [email protected]
“[ruby-gnome2-devel-en] Methods for things that can be accessed through
properties” on Wed, 10 Nov 2010 13:45:06 +0100,
Nikolai W. [email protected] wrote:

What do we do with methods for things that can be accessed through properties?

I think that accessors for properties are generated
automatically. And boolean properties will also get XXX?
accessors.

Yes, that seems to be the case. I will remove all duplicated functions.

P.S. Nikolai, did you see the bug?

http://sourceforge.net/tracker/?func=detail&aid=3104368&group_id=53614&atid=470969

No. As stated, 2.27 is a development series and there has not been a
deprecation of that constant, so I find it a bit odd. I’ll look into
it. I’ve noticed quite a few other small bugs while creating the
documentation, which is about halfway done.

On Wed, Nov 10, 2010 at 14:45, Kouhei S. [email protected] wrote:

I think that accessors for properties are generated
automatically. And boolean properties will also get XXX?
accessors.

Actually, it seems that a bit too many properties are generated. It
would be better if properties weren’t generated if a method of the
same name already exists. This is, for example, important for the
data property of GLib::MemoryOutputStream. The property is of type
gpointer, but to be usable you want to return a Ruby String. Also,
the destroy-function and realloc-function are completely useless on
the same class, and it would be nice if there was a way to tell GLib
to ignore these properties as well.

Any input on how we solve this?

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] Methods for things that can be accessed
through properties” on Thu, 11 Nov 2010 10:46:21 +0100,
Nikolai W. [email protected] wrote:

gpointer, but to be usable you want to return a Ruby String. Also,
the destroy-function and realloc-function are completely useless on
the same class, and it would be nice if there was a way to tell GLib
to ignore these properties as well.

Any input on how we solve this?

Sorry. There is no way for this.
You can undef generated methods or improve Ruby/GLib2.

Thanks,

kou