Re: Properties on interfaces



On Fri, 2003-02-14 at 16:29, Matthias Clasen wrote:
> On Fri, 2003-02-14 at 17:59, Owen Taylor wrote:
> > 
> > > What does "forwarding" mean here, considering that the
> > > get_property/set_property implementation is in the dialog_class anyway ?
> > > If it only means to reuse the paramspec from the interface property,
> > > couldn't you achieve the same effect by
> > > 
> > > g_object_class_install_property (file_chooser_dialog_class,
> > >                                  PROP_FILENAME,
> > >                                  g_param_spec_pool_lookup (pspec_pool,
> > >                                               "filename",
> > >                                               GTK_TYPE_FILE_CHOOSER));
> > 
> > Doesn't work. A paramspec can't be installed for multiple classes.
> > 
> 
> I guess I meant
> 
> g_object_class_install_property (file_chooser_dialog_class,
>                                  PROP_FILENAME,
>                                  g_param_spec_copy (
>                                     g_param_spec_pool_lookup (pspec_pool,
>                                               "filename",
>                                               GTK_TYPE_FILE_CHOOSER)));
> 
> ie use the interface properties just a some kind of templates for
> ordinary properties.

But wouldn't you like a convenience function to do the above? 
That's basically what I was proposing, though since nick/blurb
strings can have significant size, a shallow copy of some sort
may make sense.

Regards,
                                   Owen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]