Re: [gtk-list] Global Variables
- From: Havoc Pennington <rhp zirx pair com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Global Variables
- Date: Fri, 19 Mar 1999 22:56:13 -0500 (EST)
On Fri, 19 Mar 1999, Eric Gillespie, Jr. wrote:
>
> Is there any actual benefit to doing this?
>
Well, you can think of this as creating a subclass of the widget with the
data being attached to it, with an additional instance variable.
Then it has all the usual advantages of bundling data up into objects
instead of leaving it lying around for the whole program. For a small
program it isn't going to matter though.
Most of the advantages have to do with ease of maintenance and reducing
bugs, but one functional advantage is permitting multiple instances of
whatever conceptual object your data is a part of.
If you really want to know though you should get some good programming
books and read them. Look through some Usenet FAQs and search the web, you
should be able to find all sorts of suggestions.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]