setValue may not be called from beginEdit, but may be called from createInstance, according to http://openfx.sourceforge.net/Documentation/1.3/ofxProgrammingReference.html#SettingParams

pointed out by @MrKepzie