Re: [Tutor] Setting a global variable on class initialisation

2006-04-28 Thread Alan Gauld
> Sorry I didn't make the problem I'm working with all too clear. Basically > I'm working with a class (Directory) that upon creation reads in a 3 files > and from these files populates one main list. > This bit is fine. > > The trickier bit was that I need to use two of the sublists (e.g the > con

[Tutor] Setting a global variable on class initialisation

2006-04-28 Thread Max Russell
Hello again   Sorry I didn't make the problem I'm working with all too clear. Basically I'm working with a class (Directory) that upon creation reads in a 3 files and from these files populates one main list. This bit is fine.   The trickier bit was that I need to use two of the sublists (

Re: [Tutor] Setting a global variable on class initialisation

2006-04-27 Thread Danny Yoo
> I know that overall Global variables are bad idea, however, I have a > situation where on on initialisation of a class, I need to read in two > files and then populate two lists. Hi Max, Could you give more context to this problem? I'm not sure we get it yet. *grin* > The lists need to w

Re: [Tutor] Setting a global variable on class initialisation

2006-04-27 Thread Tim Golden
[Max Russell] | I know that overall Global variables are bad idea, however, | I have a situation where on on initialisation of a class, I | need to read in two files and then populate two lists. | The lists need to would appear to need to be outwith the | class I am working with and global. |

Re: [Tutor] Setting a global variable on class initialisation

2006-04-27 Thread Kent Johnson
Max Russell wrote: > Hello- > > I know that overall Global variables are bad idea, however, I have a > situation where on on initialisation of a class, I need to read in two > files and then populate two lists. What do you mean by class initialization? If you want to read the files and popul

[Tutor] Setting a global variable on class initialisation

2006-04-27 Thread Max Russell
Hello-   I know that overall Global variables are  bad idea, however, I have a situation where on on initialisation of a class, I need to read in two files and then populate two lists. The lists need to would appear to need to be outwith the class I am working with and global.   Can anyone