Re: G_OBJECT_WARN_INVALID_PROPERTY_ID



On 15 May 2001, Owen Taylor wrote:

> 
> What's the point of including this macro in every get/set property
> function?
> 
> Doesn't the signal system take care of making sure that a get/set
> property function isn't called with a property it doesn't understand?

right, not the signal system, but the proeprty setting/getting stubs make
sure that no invalid proeprt ids or pspecs are apssed in to get/set
property. it also ensures you that set values are always compliant
to ranges (or other constrains) specified in the pspecs.

however, think about forgetting to handle a certain property id in the
switch statement when coding up a set/get implementation, that's
what these macros catch.

> 
> Regards,
>                                         Owen
> 

---
ciaoTJ





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