On 2012-11-09 19:39, Geoffrey Hutchison wrote:
>> class. Somehow I expected the constructor of OBGlobalDataBase would get
>> called when I instantiated and object of the new class, and that would
>> read the file, but this doesn't seem to happen. Why not? Should I call
>> the parent constructor explicitly?
>
> You haven’t shown the actual code for your constructor, but here’s an example 
> from src/data.cpp:
>    OBElementTable::OBElementTable()
>    {
>      _init = false;
>      _dir = BABEL_DATADIR;
>      _envvar = "BABEL_DATADIR";
>      _filename = "element.txt";
>      _subdir = "data";
>      _dataptr = ElementData;
>    }
>
>
> Hope that helps,
> -Geoff
>
I solved it by calling Init() in the constructor. I'm learning!
Hope to have the heat of formation in in a few days.

-- 
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
sp...@xray.bmc.uu.se    http://folding.bmc.uu.se

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to