[Gambas-user] config file issue
Benoit Minisini
gambas at ...1...
Wed Apr 13 16:23:47 CEST 2005
On Wednesday 13 April 2005 15:51, Thomas Mathiesen wrote:
> > Speaking as the guy who wrote the backtick function (which could
> > probably use some refinement), I'd love to see a project where it
> > fails to work so I can find the bug in my function. Could you send
> > one?
> >
> > Also, rather than using awk and backtick, it looks to me like you
> > should really be doing
> >
> > dim s as string
> > dim t as string
> > dim pair as new string[]
> > dim c as new collection
> >
> > s = file.load("/path/to/config/file")
> > for each t in split(s, "\n")
> > pair = split(t, " ")
> > c[pair[0]] = pair[1]
> > next
> >
> > Of course, you'd need to make c a public variable rather than using
> > DIM if you want to use it throughout your project.
> >
> > Rob
>
> Great function Rob!
> I've found out that I could use this Gambas file.load to do the config,
> but I wanted to get the backtick fixed.. because I know I'll need it one
> day.
>
> /T
>
Did you get my last e-mail ? It was not a bug. Just do not name your menu
control 'File', so that it does not override the File class when you write
something like 'File.Load' :-)
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list