Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/02/12 10:13:16 (12 years ago)
Author:
mkommend
Message:

#1810: Corrected event registration for grammar configuration and updated samples.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r8139 r8175  
    4848    [StorableConstructor]
    4949    protected SymbolicClassificationSingleObjectiveProblem(bool deserializing) : base(deserializing) { }
    50     protected SymbolicClassificationSingleObjectiveProblem(SymbolicClassificationSingleObjectiveProblem original, Cloner cloner) : base(original, cloner) { }
     50    protected SymbolicClassificationSingleObjectiveProblem(SymbolicClassificationSingleObjectiveProblem original, Cloner cloner)
     51      : base(original, cloner) {
     52      RegisterEventHandlers();
     53    }
    5154    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicClassificationSingleObjectiveProblem(this, cloner); }
    5255
     
    6063      MaximumSymbolicExpressionTreeLength.Value = InitialMaximumTreeLength;
    6164
    62       SymbolicExpressionTreeGrammarParameter.ValueChanged += (o, e) => ConfigureGrammarSymbols();
    63 
     65      RegisterEventHandlers();
    6466      ConfigureGrammarSymbols();
    6567      InitializeOperators();
     
    6971    [StorableHook(HookType.AfterDeserialization)]
    7072    private void AfterDeserialization() {
     73      RegisterEventHandlers();
    7174      // compatibility
    7275      bool changed = false;
     
    8083      }
    8184      if (changed) ParameterizeOperators();
     85    }
     86
     87    private void RegisterEventHandlers() {
     88      SymbolicExpressionTreeGrammarParameter.ValueChanged += (o, e) => ConfigureGrammarSymbols();
    8289    }
    8390
Note: See TracChangeset for help on using the changeset viewer.