Re: [gtk-list] Re: Method to query toggle button state?



Jimmie Mayfield <mayfield@sackheads.org> writes:

> > Most people use GTK_TOGGLE_BUTTON(widget)->active, I think.
> 
> That was precisely the point of my post.  IME, it's not a good
> design for programs to have to access internal widget members
> directly.  In OO, you could say this is defeating the object's
> encapsulation.

Not if .active is a public member of the object.  Or am I missing a
subtler point?

> But however you choose to describe it, programs that do stuff like
> this are dependent on the internal design of the object and that is
> a "bad thing" (tm).

Again, if the .active element is a public member of the structure.  I
fail to see what a macro or an inline function would buy you here,
exactly.



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