No problem. I think it's a good idea to have, so that you can have a text file outside of source control, that maintains different settings between your test and production servers. Right now, I'm doing a very hackish condition on the current machine name.
Doug On Tue, Jun 27, 2017 at 3:16 PM, Aparajita Fishman <[email protected]> wrote: > The error message is exactly correct; a4d.utils.parseConfig doesn't exist! > In fact, I can't find any trace of it in the source code. I have no idea > what happened to it, or why I so thoroughly documented something that > doesn't exist. My apologies! > > > On Jun 26, 2017, at 2:26 PM, Doug Hall <[email protected]> wrote: > > > > I thought I had already posted this email, but apparently it didn't go > > through. :-/ > > > > I'm trying to read a config file, as shown in the documentation, within > > Active4D's "On Application Start" method: > > > > $path := join paths(default directory(*); "mail.ini") > > if(file exists($path)) > > $config := a4d.utils.parseConfig($path) > > globals{"mail.host"}:=$config{"host"} > > log message("email host: "+$config{"host"}) > > // a4d.utils.setSMTPHost($config{"host"}) > > // log message('SMTP host set to $config{"host"}') > > globals{"mail.to"} := $config{"to"} > > log message("Mail.ini full path: "+$path) > > else > > log message('The email config file: $path does not exist.';true) > > end if > > > > This didn't work. It errors out saying: > > > > Active4D: [error] The specified method does not exist: > > /Users/dhall/Documents/AIDTdb/Active4D/Active4D.a4l, method "Active4D.On > > Application Start", line 43 > > > > Even if I refactor the above part into a Library method > > (main.read_email_config) and call that from within On Application Start, > it > > gives a similar error: > > > > Active4D: [error] The specified method does not exist: > > /Users/dhall/Documents/AIDTdb/weblib/main.a4l, method > > "main.read_email_config", line 438 > > > > Any help would be appreciated, > > Doug Hall > > _______________________________________________ > > Active4D-dev mailing list > > [email protected] > > http://list.aparajitaworld.com/listinfo/active4d-dev > > Archives: http://active4d-nabble.aparajitaworld.com/ > > _______________________________________________ > Active4D-dev mailing list > [email protected] > http://list.aparajitaworld.com/listinfo/active4d-dev > Archives: http://active4d-nabble.aparajitaworld.com/ > _______________________________________________ Active4D-dev mailing list [email protected] http://list.aparajitaworld.com/listinfo/active4d-dev Archives: http://active4d-nabble.aparajitaworld.com/
