Re: Properties on interfaces



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.

Matthias







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